![]() |
ULIS
dev4.0.7
Utility Library for Imaging Systems
|
The IHasFormat class provides an interface for accessing format informations for image related classes that have a format. More...
Public Member Functions | |
~IHasFormat () | |
uint8 | AlphaIndex () const |
uint8 | BytesPerPixel () const |
uint8 | BytesPerSample () const |
uint8 | DefaultProfileCode () const |
eFormat | Format () const |
const FFormatMetrics & | FormatMetrics () const |
bool | HasAlpha () const |
const uint8 * | IndexTable () const |
bool | Linear () const |
eColorModel | Model () const |
uint8 | NumColorChannels () const |
bool | Planar () const |
bool | Premultiplied () const |
uint8 | RedirectedIndex (uint8 iIndex) const |
bool | Reversed () const |
uint8 | SamplesPerPixel () const |
bool | Swapped () const |
eType | Type () const |
Protected Member Functions | |
IHasFormat (eFormat iFormat) | |
void | ReinterpretFormat (eFormat iFormat) |
The IHasFormat class provides acces to a FFormatMetrics and interfaces for easy access to format information.
|
inlineprotected |
Constructor from eFormat.
|
inline |
Destructor.
|
inline |
Return the redirected index of the alpha channel.
|
inline |
Return the number of bytes per pixel. For eFormat::Format_RGBA8, this value is 4.
|
inline |
Return the number of bytes per sample ( per channel ). For eFormat::Format_RGBA8, this value is 1.
|
inline |
Return wether the format default profile identifier.
|
inline |
Return the underlying eFormat value.
|
inline |
Return the underlying FFormatMetrics struct.
|
inline |
Return wether the format has an extra alpha channel.
|
inline |
Return the redirection table for models layout indexes.
Models have intrinsic indices associated with the channels components, for example RGB models associate indexes with channels this way: ( ( R, 0 ), ( G, 1 ), ( B, 2 ) )
For eFormat::Format_RGBA8, the index table might look like this: [0,1,2,3]
For eFormat::Format_ABGR8, the index table might look like this: [3,2,1,0]
For eFormat::Format_BGRA8, the index table might look like this: [2,1,0,3]
|
inline |
Return wether the format is linear or not.
|
inline |
Return the extrapolated eColorModel model.
|
inline |
Return the number of color channels, alpha is not part of the color channels. For RGB, this value is 3.
|
inline |
Return wether the format is planar or not.
|
inline |
Return wether the format is premultiplied or not.
Return the redirected index for the given "natural" index.
|
inlineprotected |
Reinterpret the format by changing the value and extrapolating and caching the values again.
This is not part of the public interface because there are strict constraints and circumstances under which and format reinterpretation is allowed. These circumstances are defined by the child classes.
|
inline |
Return wether the layout is reversed or not.
|
inline |
Return the number of samples or channels, alpha is taken into account. For eFormat::Format_RGBA8, this value is 4.
|
inline |
Return wether the layout is swapped or not.
|
inline |
Return the extrapolated eType type.