Classes | Enumerator | Functions | Variables

Base Image Library
[Image Library]

This library is used only by clients that are writing an image loader. More...

Collaboration diagram for Base Image Library:

Classes

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

Functions

 media::image_t::image_t (void) throw ()
 media::image_t::~image_t (void) throw ()
void media::image_t::clear (void) throw ()
void media::image_t::setImageType (const char *type) throw ()
bool media::image_t::isValid (void) const throw ()
void media::image_t::dump (const char *txt) const throw ()
void media::image_t::allocate (void)
virtual const char * media::ImageLoader::getLoaderName (void) const =0 throw ()
 tell us the name of yourself
virtual bool media::ImageLoader::canLoadImage (nstream::Manager *mgr, const char *name) const =0
 image loader should return true if this is an image this loader can load.
virtual void media::ImageLoader::load (nstream::Stream *stream, image_t &image) const =0
 here the loader actually loads

Variables

int32_t media::image_t::width
int32_t media::image_t::height
int32_t media::image_t::bit_depth
eColorFormat media::image_t::color_format
int32_t media::image_t::bytes_per_pixel
char media::image_t::imageType [eMaxString]
byte_tmedia::image_t::data



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

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

More...

Detailed Description

This library is used only by clients that are writing an image loader.

If you just want to load images, use the Image Library library instead.


Enumeration Type Documentation

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

Enumerator:
eColorFormat_Grayscale 

grayscale, usually 8 bit

eColorFormat_GrayAlpha 

gray plus alpha, 16 bit?

eColorFormat_RGB 

RGB, usually 24 bit.

eColorFormat_RGBA 

RGBA, usually 32 bit.

eColorFormat_Invalid 

Definition at line 67 of file image-base.h.


Function Documentation

media::image_t::image_t ( void   )  throw () [inline, inherited]

Definition at line 89 of file image-base.h.

media::image_t::~image_t ( void   )  throw () [inline, inherited]

Definition at line 90 of file image-base.h.

void media::image_t::clear ( void   )  throw () [inline, inherited]

Definition at line 93 of file image-base.h.

void media::image_t::setImageType ( const char *  type  )  throw () [inline, inherited]

Definition at line 104 of file image-base.h.

bool media::image_t::isValid ( void   )  const throw () [inline, inherited]

Definition at line 108 of file image-base.h.

void media::image_t::dump ( const char *  txt  )  const throw () [inherited]

Definition at line 59 of file image-base.cpp.

void media::image_t::allocate ( void   )  [inline, inherited]

Definition at line 117 of file image-base.h.

virtual const char* media::ImageLoader::getLoaderName ( void   )  const throw () [pure virtual, inherited]

tell us the name of yourself

virtual bool media::ImageLoader::canLoadImage ( nstream::Manager mgr,
const char *  name 
) const [pure virtual, inherited]

image loader should return true if this is an image this loader can load.

virtual void media::ImageLoader::load ( nstream::Stream stream,
image_t image 
) const [pure virtual, inherited]

here the loader actually loads


Variable Documentation

int32_t media::image_t::width [inherited]

Definition at line 129 of file image-base.h.

int32_t media::image_t::height [inherited]

Definition at line 130 of file image-base.h.

int32_t media::image_t::bit_depth [inherited]

Definition at line 131 of file image-base.h.

eColorFormat media::image_t::color_format [inherited]

Definition at line 132 of file image-base.h.

int32_t media::image_t::bytes_per_pixel [inherited]

Definition at line 133 of file image-base.h.

char media::image_t::imageType[eMaxString] [inherited]

Definition at line 134 of file image-base.h.

Definition at line 135 of file image-base.h.