class ffw::ImageFormat
Class List > ffw :: ImageFormat
Inherited by the following classes: ffw::ImageBuffer, ffw::ImageReader, ffw::ImageWriter
Protected Attributes
Type | Name |
---|---|
ffw::ImageType | format |
int | width |
int | height |
int | depth |
Public Functions
Type | Name |
---|---|
ImageFormat () | |
ImageFormat (int width, int height, int depth, ffw::ImageType format) | |
ImageFormat (const ImageFormat & other) | |
ImageType | getImageType () const Returns the image type enum of this format. |
int | getWidth (int mipmap = 0) const Returns the width. |
int | getHeight (int mipmap = 0) const Returns the height. |
int | getDepth (int mipmap = 0) const Returns the depth. |
size_t | getStrideSize (int mipmap = 0) const |
int | getBitsPerPixel () const Returns the number of bits per one pixels. |
int | getBitDepth () const Returns the bit depth. |
int | getNumberOfChannels () const Returns the number of channels. |
bool | isCompressed () const Returns true if the pixels are compressed. |
size_t | getMipMapSize (int level) const Returns the size of a mipmap (in bytes) given a mipmap level. |
size_t | getMipMapPtrOffset (int level) const Returns the pointer to the beginning of a mipmap pixels. |
void | swap (ImageFormat & other) |
ImageFormat & | operator= (const ImageFormat & other) |
size_t | getAllocationSize (int mipmaps) const Returns the number of bytes needed to allocate an image provided number of mipmaps. |
bool | operator== (const ImageFormat & other) const |
Protected Attributes Documentation
variable format
ffw::ImageType ffw::ImageFormat::format;
variable width
int ffw::ImageFormat::width;
variable height
int ffw::ImageFormat::height;
variable depth
int ffw::ImageFormat::depth;
Public Functions Documentation
function ImageFormat (1/3)
ffw::ImageFormat::ImageFormat ()
function ImageFormat (2/3)
ffw::ImageFormat::ImageFormat (
int width,
int height,
int depth,
ffw::ImageType format
)
function ImageFormat (3/3)
ffw::ImageFormat::ImageFormat (
const ImageFormat & other
)
function getImageType
ImageType ffw::ImageFormat::getImageType () const
Returns the image type enum of this format.
function getWidth
int ffw::ImageFormat::getWidth (
int mipmap = 0
) const
Returns the width.
Parameters:
- mipmap Optional mipmap level (default is zero)
function getHeight
int ffw::ImageFormat::getHeight (
int mipmap = 0
) const
Returns the height.
Parameters:
- mipmap Optional mipmap level (default is zero)
function getDepth
int ffw::ImageFormat::getDepth (
int mipmap = 0
) const
Returns the depth.
Parameters:
- mipmap Optional mipmap level (default is zero)
function getStrideSize
size_t ffw::ImageFormat::getStrideSize (
int mipmap = 0
) const
function getBitsPerPixel
int ffw::ImageFormat::getBitsPerPixel () const
Returns the number of bits per one pixels.
For example a format of RGB_888 has 24 bits per pixel
function getBitDepth
int ffw::ImageFormat::getBitDepth () const
Returns the bit depth.
For example, a format of RGB_ALPHA_16161616F has bit depth of 16
function getNumberOfChannels
int ffw::ImageFormat::getNumberOfChannels () const
Returns the number of channels.
For example, a format of RGB_ALPHA_8888 has 4 channels.
function isCompressed
bool ffw::ImageFormat::isCompressed () const
Returns true if the pixels are compressed.
Only accepts RGB_DXT1, RGB_ALPHA_DXT3, RGB_ALPHA_DXT5, RED_RGTC1, SIGNED_RED_RGTC1, RED_GREEN_RGTC2, and SIGNED_RED_GREEN_RGTC2 as valid compressed pixels.
function getMipMapSize
size_t ffw::ImageFormat::getMipMapSize (
int level
) const
Returns the size of a mipmap (in bytes) given a mipmap level.
Parameters:
- level Must be zero or higher
function getMipMapPtrOffset
size_t ffw::ImageFormat::getMipMapPtrOffset (
int level
) const
Returns the pointer to the beginning of a mipmap pixels.
Parameters:
- level Must be zero or higher
function swap
void ffw::ImageFormat::swap (
ImageFormat & other
)
function operator=
ImageFormat & ffw::ImageFormat::operator= (
const ImageFormat & other
)
function getAllocationSize
size_t ffw::ImageFormat::getAllocationSize (
int mipmaps
) const
Returns the number of bytes needed to allocate an image provided number of mipmaps.
function operator==
bool ffw::ImageFormat::operator== (
const ImageFormat & other
) const
The documentation for this class was generated from the following file: include/ffw/media/imagebuffer.h