InstantIO::Image Class Reference

Image class More...

#include <InstantIO/Image.h>

List of all members.

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 Imageoperator= (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.

Detailed Description

Image class


Constructor & Destructor Documentation

InstantIO::Image::Image (  ) 

Constructor.

Creates a new Image object.

InstantIO::Image::~Image (  ) 

Destructor.

Destroys the Image object.


Member Function Documentation

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.

Parameters:
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.

Returns:
The width
unsigned int InstantIO::Image::getHeight (  )  const [inline]

Returns the height.

Returns the height of the image data in pixels.

Returns:
The height
Format InstantIO::Image::getFormat (  )  const [inline]

Returns the format.

Returns the format of the image data.

Returns:
The format
char* InstantIO::Image::getBuffer (  )  const [inline]

Returns the buffer.

Returns a pointer to the buffer that holds the image data.

Returns:
The buffer
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.

Returns:
The size
static const char* InstantIO::Image::format2String ( Format  format  )  [static]

Converts a Format enumeration value to a human-readable string.

Parameters:
format The Format enumeration value
Returns:
The human-readable string
static Format InstantIO::Image::string2Format ( const std::string &  str  )  [static]

Converts a human-readable string to a Format enumeration value.

Parameters:
str The human-readable string
Returns:
The Format enumeration value
void InstantIO::Image::convertFormat ( Format  format,
Image image 
) const

Converts the Image object to another format.

Parameters:
format The new image format
image An Image object that gets filled with the converted image data.

Friends And Related Function Documentation

bool operator== ( const Image i1,
const Image i2 
) [friend]

Equality operator.

Parameters:
i1 The first Image object.
i2 The second Image object.
Returns:
true when the Image objects are equal, false otherwise.
bool operator!= ( const Image i1,
const Image i2 
) [friend]

Inequality operator.

Parameters:
i1 The first Image object.
i2 The second Image object.
Returns:
true when the Image objects are not equal, false otherwise.

The documentation for this class was generated from the following file:
Generated on Thu Jul 31 17:17:32 2014 by  doxygen 1.6.3