#include <image.h>
Inheritance diagram for fl::PixelFormat:
Public Methods | |
| virtual Image | filter (const Image &image) |
| Return an Image in this format. | |
| void | fromAny (const Image &image, Image &result) const |
| virtual bool | operator== (const PixelFormat &that) const |
| Checks if this and that describe the same actual format. | |
| bool | operator!= (const PixelFormat &that) const |
| virtual unsigned int | getRGBA (void *pixel) const=0 |
| Return value is always assumed to be non-linear sRGB. Same for other RGB methods below. | |
| virtual void | getRGBA (void *pixel, float values[]) const |
| "values" must have at least four elements. Each returned value is in [0,1]. | |
| virtual void | getXYZ (void *pixel, float values[]) const |
| virtual unsigned int | getYUV (void *pixel) const |
| virtual unsigned char | getGray (void *pixel) const |
| virtual void | getGray (void *pixel, float &gray) const |
| virtual unsigned char | getAlpha (void *pixel) const |
| Returns fully opaque by default. PixelFormats that actually have an alpha channel must override this to return correct value. | |
| virtual void | setRGBA (void *pixel, unsigned int rgba) const=0 |
| virtual void | setRGBA (void *pixel, float values[]) const |
| Each value must be in [0,1]. Values outside this range will be clamped and modified directly in the array. | |
| virtual void | setXYZ (void *pixel, float values[]) const |
| virtual void | setYUV (void *pixel, unsigned int yuv) const |
| virtual void | setGray (void *pixel, unsigned char gray) const |
| virtual void | setGray (void *pixel, float gray) const |
| virtual void | setAlpha (void *pixel, unsigned char alpha) const |
| Ignored by default. Formats that actually have an alpha channel must override this method. | |
Public Attributes | |
| int | depth |
| Number of bytes in one pixel, including any padding. | |
| int | precedence |
| Imposes a (partial?) order on formats according to information content. Bigger numbers have more information. | |
| bool | monochrome |
| Indicates that this format has no color components. | |
| bool | hasAlpha |
| Indicates that this format has a real alpha channel (as apposed to a default alpha value). | |
|
|
Return an Image in this format.
Implements fl::Filter. Reimplemented in fl::PixelFormatGrayChar, fl::PixelFormatGrayFloat, fl::PixelFormatGrayDouble, fl::PixelFormatRGBAChar, fl::PixelFormatRGBABits, fl::PixelFormatYVYUChar, and fl::PixelFormatVYUYChar. |
|
||||||||||||
|
Reimplemented in fl::PixelFormatGrayChar, fl::PixelFormatGrayFloat, and fl::PixelFormatGrayDouble. |
|
|
Returns fully opaque by default. PixelFormats that actually have an alpha channel must override this to return correct value.
Reimplemented in fl::PixelFormatRGBAChar, fl::PixelFormatRGBABits, and fl::PixelFormatRGBAFloat. |
|
||||||||||||
|
Reimplemented in fl::PixelFormatGrayChar, fl::PixelFormatGrayFloat, and fl::PixelFormatGrayDouble. |
|
|
Reimplemented in fl::PixelFormatGrayChar, fl::PixelFormatGrayFloat, fl::PixelFormatGrayDouble, fl::PixelFormatYVYUChar, and fl::PixelFormatVYUYChar. |
|
||||||||||||
|
"values" must have at least four elements. Each returned value is in [0,1].
Reimplemented in fl::PixelFormatGrayFloat, fl::PixelFormatGrayDouble, fl::PixelFormatRGBAFloat, and fl::PixelFormatHLSFloat. |
|
|
Return value is always assumed to be non-linear sRGB. Same for other RGB methods below.
Implemented in fl::PixelFormatGrayChar, fl::PixelFormatGrayFloat, fl::PixelFormatGrayDouble, fl::PixelFormatRGBAChar, fl::PixelFormatRGBABits, fl::PixelFormatRGBAFloat, fl::PixelFormatYVYUChar, fl::PixelFormatVYUYChar, and fl::PixelFormatHLSFloat. |
|
||||||||||||
|
Reimplemented in fl::PixelFormatGrayChar, fl::PixelFormatGrayFloat, and fl::PixelFormatGrayDouble. |
|
|
See PixelFormatYVYUChar::setRGBA() for more details on the conversion matrix. Reimplemented in fl::PixelFormatYVYUChar, and fl::PixelFormatVYUYChar. |
|
|
|
|
|
Checks if this and that describe the same actual format.
Reimplemented in fl::PixelFormatRGBAChar, and fl::PixelFormatRGBABits. |
|
||||||||||||
|
Ignored by default. Formats that actually have an alpha channel must override this method.
Reimplemented in fl::PixelFormatRGBAChar, fl::PixelFormatRGBABits, and fl::PixelFormatRGBAFloat. |
|
||||||||||||
|
Reimplemented in fl::PixelFormatGrayChar, fl::PixelFormatGrayFloat, and fl::PixelFormatGrayDouble. |
|
||||||||||||
|
Reimplemented in fl::PixelFormatGrayChar, fl::PixelFormatGrayFloat, and fl::PixelFormatGrayDouble. |
|
||||||||||||
|
Each value must be in [0,1]. Values outside this range will be clamped and modified directly in the array.
Reimplemented in fl::PixelFormatGrayFloat, fl::PixelFormatGrayDouble, fl::PixelFormatRGBAFloat, and fl::PixelFormatHLSFloat. |
|
||||||||||||
|
||||||||||||
|
Reimplemented in fl::PixelFormatGrayChar, fl::PixelFormatGrayFloat, and fl::PixelFormatGrayDouble. |
|
||||||||||||
|
Reimplemented in fl::PixelFormatYVYUChar, and fl::PixelFormatVYUYChar. |
|
|
Number of bytes in one pixel, including any padding.
|
|
|
Indicates that this format has a real alpha channel (as apposed to a default alpha value).
|
|
|
Indicates that this format has no color components.
|
|
|
Imposes a (partial?) order on formats according to information content. Bigger numbers have more information.
|
1.2.18