NAME
FLTK::PixelType - Describes how colors are stored in a pixel
Description
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.
Functions
depth
my $d = FLTK::depth( $type );-
Turn a PixelType into the number of bytes needed to hold a pixel.
Import this function with the
:pixeltypetag.
PixelTypes
These are the currently supported types:
MASK1 byte os inverted mask, filled with current color
MONO1 byte of gray scale
RGBxbytes in
r,g,b,a,r,g,b,a...order,abyte is ignoredRGBbytes in
r,g,b,r,g,b...orderRGBAbytes in
r,g,b,a,r,g,b,a...orderRGB3232-bit words containing
0xaarrggbb(aa is ignored)ARGB3232-bit words containing
0xaarrggbbRGBMUnpremultiplied bytes in
r,g,b,aorder. Not yet implemented, acts like RGBA.MRGB32Unpremultiplied <0xaarrggbb>. Not yet implemented, acts like ARGB32.
Author
Sanko Robinson <sanko@cpan.org> - http://sankorobinson.com/
License and Legal
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.