
FLTK::PixelType - Describes how colors are stored in a pixel

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 FLTK::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 FLTK::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.

depth my $d = FLTK::depth( $type );Turn a PixelType into the number of bytes needed to hold a pixel.
Import this function with the :pixeltype tag.

These are the currently supported types:
MASK
1 byte os inverted mask, filled with current color
MONO
1 byte of gray scale
RGBx
bytes in r,g,b,a,r,g,b,a... order,
a byte is ignored
RGB
bytes in r,g,b,r,g,b... order
RGBA
bytes in r,g,b,a,r,g,b,a... order
RGB32
32-bit words containing 0xaarrggbb (aa is ignored)
ARGB32
32-bit words containing 0xaarrggbb
RGBM
Unpremultiplied bytes in r,g,b,a order.
Not yet implemented,
acts like RGBA.
MRGB32
Unpremultiplied <0xaarrggbb>. Not yet implemented, acts like ARGB32.

Sanko Robinson <sanko@cpan.org> - http://sankorobinson.com/

Copyright (C) 2008-2010 by Sanko Robinson <sanko@cpan.org>
This program is free software; you can redistribute it and/or modify it under the terms of The Artistic License 2.0. See the LICENSE file included with this distribution or notes on the Artistic License 2.0 for clarification.
When separated from the distribution, all original POD documentation is covered by the Creative Commons Attribution-Share Alike 3.0 License. See the clarification of the CCA-SA3.0.