Classes | Functions | Variables

media Namespace Reference

Classes

struct  image_t
 this is a basic image object. More...
class  ImageLoader
 anyone wanting to support loading an image type must provide this interface. More...

Enumerations

enum  eColorFormat {
  eColorFormat_Grayscale = 1,
  eColorFormat_GrayAlpha = 2,
  eColorFormat_RGB = 5,
  eColorFormat_RGBA = 6,
  eColorFormat_Invalid = 0
}
 

refers to what sort of data you have per-pixel in the image

More...

Functions

static Registry * getRegistry (void)
static void init_source (struct jpeg_decompress_struct *pds)
static int fill_input_buffer (struct jpeg_decompress_struct *pds)
static void skip_input_data (struct jpeg_decompress_struct *pds, long bytes)
static void term_source (struct jpeg_decompress_struct *pds)
static void setJpegSourceStream (struct jpeg_decompress_struct &cinfo, std::istream &stream)
static void my_error_exit (j_common_ptr cinfo)
void readJpegFromStream (std::istream &stream, image_t &image)
static void pngReadFromStream (png_structp ctx, png_bytep data, png_size_t bytes)
static int getBytesPerPixel (int ct) throw ()
static eColorFormat getColorFormat (int pngColorType) throw ()
void readPngFromStream (std::istream &stream, image_t &png)

bool loadImage (nstream::Manager *mgr,const char *name,image_t &image)
 use this nstream-based routine to load images (see Named Stream Management).

smart_ptr< ImageLoadercreateJpegImageLoader (void)
 create an ImageLoader for JPEG images

smart_ptr< ImageLoadercreatePngImageLoader (void)
 creates an image loader for use by the Image Library library.

Variables

static const int s_bufferSize = 4096

Function Documentation

static Registry* media::getRegistry ( void   )  [static]

Definition at line 151 of file wave-image.cpp.

static void media::init_source ( struct jpeg_decompress_struct *  pds  )  [static]

Definition at line 66 of file wave-jpeg.cpp.

static int media::fill_input_buffer ( struct jpeg_decompress_struct *  pds  )  [static]

Definition at line 78 of file wave-jpeg.cpp.

static void media::skip_input_data ( struct jpeg_decompress_struct *  pds,
long  bytes 
) [static]

Definition at line 113 of file wave-jpeg.cpp.

static void media::term_source ( struct jpeg_decompress_struct *  pds  )  [static]

Definition at line 138 of file wave-jpeg.cpp.

static void media::setJpegSourceStream ( struct jpeg_decompress_struct &  cinfo,
std::istream &  stream 
) [static]

Definition at line 150 of file wave-jpeg.cpp.

static void media::my_error_exit ( j_common_ptr  cinfo  )  [static]

Definition at line 196 of file wave-jpeg.cpp.

void media::readJpegFromStream ( std::istream &  stream,
image_t &  image 
)

Definition at line 214 of file wave-jpeg.cpp.

static void media::pngReadFromStream ( png_structp  ctx,
png_bytep  data,
png_size_t  bytes 
) [static]

Definition at line 45 of file wave-png.cpp.

static int media::getBytesPerPixel ( int  ct  )  throw () [static]

Definition at line 69 of file wave-png.cpp.

static eColorFormat media::getColorFormat ( int  pngColorType  )  throw () [static]

Definition at line 89 of file wave-png.cpp.

void media::readPngFromStream ( std::istream &  stream,
image_t &  png 
)

Definition at line 109 of file wave-png.cpp.


Variable Documentation

const int media::s_bufferSize = 4096 [static]

Definition at line 41 of file wave-jpeg.cpp.