Enumerations | |
| enum | PixelType { MASK, MONO, RGBx, RGB, RGBA, RGB32, ARGB32, RGBM, MRGB32 } |
Functions | |
| int | depth (PixelType t) |
|
|
Enumeration describing how colors are stored in an array of bytes that is a pixel. This is used as an argument for drawimage(), readimage(), and Image. Notice that the order of the bytes in memory of ARGB32 or RGB32 is a,r,g,b on a little-endian machine and b,g,r,a on a big-endian machine. Due to the use of these types by Windows, this is often the fastest form of data, if you have a choice. To convert an Color to RGB32, shift it right by 8 (for ARGB32 shift the alpha left 24 and or it in). More types may be added in the future. The set is as minimal as possible while still covering the types I have actually encountered.
|
|
|
Turn a PixelType into the number of bytes needed to hold a pixel. |
©2006 Bill Spitzak and others.