Image class More...
#include <InstantIO/Image.h>
Public Types | |
| enum | Format { FMT_NONE, FMT_BGR232, FMT_BGR555, FMT_BGR565, FMT_BGR24, FMT_RGB24, FMT_BGR32, FMT_RGB32, FMT_SHORT16, FMT_FLOAT16, FMT_FLOAT32, FMT_Y444, FMT_IYU2, FMT_I420, FMT_YVU9, FMT_YUV9, FMT_Y800, FMT_Y1600, FMT_Y422, FMT_Y411, FMT_Y41P, FMT_YV12, FMT_YUY2, FMT_YUV422P, FMT_YUV411P } |
Defines the different kinds of image formats the Image class can handle. | |
Public Member Functions | |
| Image () | |
| Constructor. | |
| Image (const Image &image) | |
| Copy constructor. | |
| const Image & | operator= (const Image &image) |
| Copy operator. | |
| ~Image () | |
| Destructor. | |
| void | setParameters (unsigned int width, unsigned int height, Format format) |
| Sets the parameters of the image. | |
| unsigned int | getWidth () const |
| Returns the width. | |
| unsigned int | getHeight () const |
| Returns the height. | |
| Format | getFormat () const |
| Returns the format. | |
| char * | getBuffer () const |
| Returns the buffer. | |
| unsigned long | getSize () const |
| Returns the size of the data in the buffer. | |
| void | convertFormat (Format format, Image &image) const |
| Converts the Image object to another format. | |
Static Public Member Functions | |
| static const char * | format2String (Format format) |
| Converts a Format enumeration value to a human-readable string. | |
| static Format | string2Format (const std::string &str) |
| Converts a human-readable string to a Format enumeration value. | |
Friends | |
| bool | operator== (const Image &i1, const Image &i2) |
| Equality operator. | |
| bool | operator!= (const Image &i1, const Image &i2) |
| Inequality operator. | |
Image class
| InstantIO::Image::Image | ( | ) |
Constructor.
Creates a new Image object.
| InstantIO::Image::~Image | ( | ) |
Destructor.
Destroys the Image object.
| void InstantIO::Image::setParameters | ( | unsigned int | width, | |
| unsigned int | height, | |||
| Format | format | |||
| ) |
Sets the parameters of the image.
This method sets the parameters of the image.
| width | The width of the image in pixels | |
| height | The height of the image in pixels | |
| format | The format of the image data |
| unsigned int InstantIO::Image::getWidth | ( | ) | const [inline] |
Returns the width.
Returns the width of the image data in pixels.
| unsigned int InstantIO::Image::getHeight | ( | ) | const [inline] |
Returns the height.
Returns the height of the image data in pixels.
| Format InstantIO::Image::getFormat | ( | ) | const [inline] |
Returns the format.
Returns the format of the image data.
| char* InstantIO::Image::getBuffer | ( | ) | const [inline] |
Returns the buffer.
Returns a pointer to the buffer that holds the image data.
| unsigned long InstantIO::Image::getSize | ( | ) | const [inline] |
Returns the size of the data in the buffer.
Returns the size of the data in the buffer in bytes.
| static const char* InstantIO::Image::format2String | ( | Format | format | ) | [static] |
Converts a Format enumeration value to a human-readable string.
| format | The Format enumeration value |
| static Format InstantIO::Image::string2Format | ( | const std::string & | str | ) | [static] |
Converts a human-readable string to a Format enumeration value.
| str | The human-readable string |
Converts the Image object to another format.
| format | The new image format | |
| image | An Image object that gets filled with the converted image data. |
1.6.3