cinder::ImageIo Class Reference

#include <ImageIo.h>

Inherited by cinder::ImageSource, and cinder::ImageTarget.

List of all members.

Public Types

enum  ColorModel { CM_RGB, CM_GRAY, CM_UNKNOWN }
enum  DataType { UINT8, UINT16, FLOAT32, DATA_UNKNOWN }
enum  ChannelType {
  CHAN_RGB_R, CHAN_RGB_G, CHAN_RGB_B, CHAN_GRAY,
  CHAN_ALPHA, CHAN_MASK, CHAN_LAB_L, CHAN_LAB_A,
  CHAN_LAB_B, CHAN_YUV_Y, CHAN_YUV_U, CHAN_YUV_V,
  CHAN_CMYK_C, CHAN_CMYK_M, CHAN_CMYK_Y, CHAN_CMYK_K,
  CHAN_UNKNOWN
}
enum  ChannelOrder {
  RGBA, BGRA, ARGB, ABGR,
  RGBX, BGRX, XRGB, XBGR,
  RGB, BGR, Y, YA,
  CUSTOM
}
typedef enum
cinder::ImageIo::ColorModel 
ColorModel
typedef enum
cinder::ImageIo::DataType 
DataType
typedef enum
cinder::ImageIo::ChannelType 
ChannelType
typedef enum
cinder::ImageIo::ChannelOrder 
ChannelOrder

Public Member Functions

int32_t getWidth () const
int32_t getHeight () const
ColorModel getColorModel () const
DataType getDataType () const
ChannelOrder getChannelOrder () const
virtual bool hasAlpha () const

Static Public Member Functions

static void translateRgbColorModelToOffsets (ChannelOrder channelOrder, int8_t *red, int8_t *green, int8_t *blue, int8_t *alpha, int8_t *inc)
static void translateGrayColorModelToOffsets (ChannelOrder channelOrder, int8_t *gray, int8_t *alpha, int8_t *inc)
static bool channelOrderHasAlpha (ChannelOrder channelOrder)
static int8_t channelOrderNumChannels (ChannelOrder channelOrder)
static uint8_t dataTypeBytes (DataType dataType)
static std::vector< std::string > getLoadExtensions ()
static std::vector< std::string > getWriteExtensions ()

Protected Member Functions

 ImageIo ()
void setSize (int32_t width, int32_t height)
void setColorModel (ColorModel colorModel)
void setDataType (DataType aDataType)
void setChannelOrder (ChannelOrder aChannelOrder)

Protected Attributes

int32_t mWidth
int32_t mHeight
ColorModel mColorModel
DataType mDataType
ChannelOrder mChannelOrder

Member Typedef Documentation


Member Enumeration Documentation

Enumerator:
CM_RGB 
CM_GRAY 
CM_UNKNOWN 
Enumerator:
UINT8 
UINT16 
FLOAT32 
DATA_UNKNOWN 
Enumerator:
CHAN_RGB_R 
CHAN_RGB_G 
CHAN_RGB_B 
CHAN_GRAY 
CHAN_ALPHA 
CHAN_MASK 
CHAN_LAB_L 
CHAN_LAB_A 
CHAN_LAB_B 
CHAN_YUV_Y 
CHAN_YUV_U 
CHAN_YUV_V 
CHAN_CMYK_C 
CHAN_CMYK_M 
CHAN_CMYK_Y 
CHAN_CMYK_K 
CHAN_UNKNOWN 
Enumerator:
RGBA 
BGRA 
ARGB 
ABGR 
RGBX 
BGRX 
XRGB 
XBGR 
RGB 
BGR 
Y 
YA 
CUSTOM 

Constructor & Destructor Documentation

cinder::ImageIo::ImageIo (  )  [protected]

Member Function Documentation

int32_t cinder::ImageIo::getWidth (  )  const
int32_t cinder::ImageIo::getHeight (  )  const
ColorModel cinder::ImageIo::getColorModel (  )  const
DataType cinder::ImageIo::getDataType (  )  const
ChannelOrder cinder::ImageIo::getChannelOrder (  )  const
virtual bool cinder::ImageIo::hasAlpha (  )  const [virtual]
void cinder::ImageIo::translateRgbColorModelToOffsets ( ChannelOrder  channelOrder,
int8_t *  red,
int8_t *  green,
int8_t *  blue,
int8_t *  alpha,
int8_t *  inc 
) [static]
void cinder::ImageIo::translateGrayColorModelToOffsets ( ChannelOrder  channelOrder,
int8_t *  gray,
int8_t *  alpha,
int8_t *  inc 
) [static]
bool cinder::ImageIo::channelOrderHasAlpha ( ChannelOrder  channelOrder  )  [static]
int8_t cinder::ImageIo::channelOrderNumChannels ( ChannelOrder  channelOrder  )  [static]
uint8_t cinder::ImageIo::dataTypeBytes ( DataType  dataType  )  [static]
vector< string > cinder::ImageIo::getLoadExtensions (  )  [static]

Returns a vector of the extensions ImageIo supports for loading. Suitable for the extensions parameters of getOpenFilePath()

vector< string > cinder::ImageIo::getWriteExtensions (  )  [static]

Returns a vector of the extensions ImageIo supports for writing. Suitable for the extensions parameters of getSaveFilePath()

void cinder::ImageIo::setSize ( int32_t  width,
int32_t  height 
) [protected]
void cinder::ImageIo::setColorModel ( ColorModel  colorModel  )  [protected]
void cinder::ImageIo::setDataType ( DataType  aDataType  )  [protected]
void cinder::ImageIo::setChannelOrder ( ChannelOrder  aChannelOrder  )  [protected]

Member Data Documentation

int32_t cinder::ImageIo::mWidth [protected]
int32_t cinder::ImageIo::mHeight [protected]

The documentation for this class was generated from the following files: