| wind&oil | |||||
|
Syndicate:
Projects: |
home :: imaging :: pixel_naming_2007.11.13.zurueck Tue, 13 Nov 2007
Pixel naming in Cairo
colour bit/channel bit/pixel cairo_format_t sheme --------------------------------------------------------------- RGB 8 24 CAIRO_FORMAT_RGB24 RGBA 8 32 CAIRO_FORMAT_ARGB32 Gray 8 8 GrayA 8 16 Alpha 8 8 CAIRO_FORMAT_A8 CMYKA 8 40 RGB 16 48 CAIRO_FORMAT_RGB48 RGBA 16 64 CAIRO_FORMAT_ARGB64 Gray 16 16 GrayA 16 32 CMYKA 16 80 RGB[A]... 16-bit float/channel use the same pixel size as the 16-bit per channel integers. RGB IEEE Half 16 48 CAIRO_FORMAT_RGB48F RGBA IEEE Half 16 64 CAIRO_FORMAT_ARGB64F ... IEEE floats and 32-bit integers: RGB FLOAT 32 96 CAIRO_FORMAT_RGB96F RGBA FLOAT 32 128 CAIRO_FORMAT_ARGB128F ... IEEE doubles: RGB DOUBLE 64 192 CAIRO_FORMAT_RGB192F RGBA DOUBLE 64 256 CAIRO_FORMAT_ARGB256FThe later can easily be confused with a 256 shades of Gray per channel naming. Do you really expect a user to always divide the pixel values by the channels count to get an idea about the colour resolution? To remember the marketing inflation of having 16 million colours and so on is long gone away. Today it is in, to say a software supports 16-bit, which is much more meaningful. As a side step, manufacturers suggesting theire consumer camera to deliver the full range of 16-bit is still a joke. Such anouncements are demystified regularily. Windows and osX have long inherited pixel naming conventions. Cairo as a young project does not. Cairo could express pixels much closer to our current language in cairo_format_t. Lets end here and come to a suggestion for a new sheme: CAIRO_FORMAT_ARGB32 -> CAIRO_FORMAT_ARGB_8 CAIRO_FORMAT_RGB24 -> CAIRO_FORMAT_RGB_8 CAIRO_FORMAT_A8 -> CAIRO_FORMAT_A_8 CAIRO_FORMAT_A1 -> CAIRO_FORMAT_A_1 #define CAIRO_FORMAT_ARGB32 CAIRO_FORMAT_ARGB_8could ashure compatibility. Later Cairo could add CAIRO_FORMAT_ARGB_16 CAIRO_FORMAT_RGB_16 CAIRO_FORMAT_RGB_HALF CAIRO_FORMAT_RGB_FLOAT... and so on. /imaging | 21 comments | permanent link TrackBack can ping me at: http://www.behrmann.name/wind/imaging/pixel_naming_2007.11.13.trackback Ovvnbhuu comment2 wrote on 2009/11/05 21:46:20: Nnrgddgb comment4 wrote on 2009/11/06 02:46:45: Lltxnvxl comment1 wrote on 2009/11/06 07:48:44: Aqmzztdy comment6 wrote on 2009/11/06 12:50:53: Xupdtosw comment5 wrote on 2009/11/10 01:58:06: Fkdjwpiz comment3 wrote on 2009/11/11 07:54:04: ZptxYASpOlHINhu 270_96.txt;8;12 wrote on 2009/11/18 04:03:17: ShYHpPntAzMzRLvn 270_98.txt;8;12 wrote on 2009/11/18 07:17:18: jVuHJJBUpnDLOnCUKXU 270_109.txt;8;12 wrote on 2009/11/18 10:30:57: bSfuQUZgVIqoSd 270_110.txt;8;12 wrote on 2009/11/18 13:40:22: EYJYBTWXcOsh 270_111.txt;8;12 wrote on 2009/11/18 16:55:01: zpgDvkTch 270_112.txt;8;12 wrote on 2009/11/18 19:54:08: ZkHsToSgRggI 270_113.txt;8;12 wrote on 2009/11/18 22:53:09: vUyxnBSbvMrTrzrCK 270_114.txt;8;12 wrote on 2009/11/19 01:50:14: HtlsZWJEKVLFezqDB 270_115.txt;8;12 wrote on 2009/11/19 05:04:47: UEbtRRxBywSoqqBkb 270_116.txt;8;12 wrote on 2009/11/19 08:22:31: AdBDjjlOlVNKfcJk 270_117.txt;8;12 wrote on 2009/11/19 11:49:22: BUqskYvXEEleiqeUo 270_118.txt;8;12 wrote on 2009/11/19 15:04:46: ikJrxEjzGvWVOgXSTk 270_119.txt;8;12 wrote on 2009/11/19 18:15:30: aaaaadd hgggg lolita bbs portal dsdsds lolitave wrote on 2009/12/05 01:40:06: dsasdada wedrf free xxx video amateur tube qwerftgq what is fallopian tube wrote on 2009/12/05 17:54:06: Your Comment | ||||