ImageJpg Class Reference

#include <ImageJpg.h>

Inheritance diagram for ImageJpg:

Image

List of all members.

Public Member Functions

 ImageJpg ()
virtual ~ImageJpg ()
virtual void removeOwnership ()
virtual unsigned char * getBits ()
virtual int getWidth ()
virtual int getHeight ()
virtual int getAlignment ()
virtual int getComponents ()
void clear ()
bool loadFromFile (const char *filename, bool readalpha=false)
bool loadFromFile (const char *filename, const char *alphafilename, bool invert)
bool loadFromBuffer (NetBuffer &buffer, bool readalpha)

Protected Member Functions

void createBlankInternal (int width, int height, bool alpha=false, unsigned char fill=255)

Protected Attributes

bool owner_
unsigned char * bits_
int width_
int height_
bool alpha_

Private Member Functions

 ImageJpg (ImageJpg &other)
ImageJpgoperator= (ImageJpg &other)


Detailed Description

Definition at line 27 of file ImageJpg.h.


Constructor & Destructor Documentation

ImageJpg::ImageJpg (  ) 

Definition at line 41 of file ImageJpg.cpp.

ImageJpg::~ImageJpg (  )  [virtual]

Definition at line 90 of file ImageJpg.cpp.

References clear().

ImageJpg::ImageJpg ( ImageJpg other  )  [private]


Member Function Documentation

virtual void ImageJpg::removeOwnership (  )  [inline, virtual]

Implements Image.

Definition at line 33 of file ImageJpg.h.

References owner_.

virtual unsigned char* ImageJpg::getBits (  )  [inline, virtual]

Implements Image.

Definition at line 34 of file ImageJpg.h.

References bits_.

Referenced by loadFromFile().

virtual int ImageJpg::getWidth (  )  [inline, virtual]

Implements Image.

Definition at line 35 of file ImageJpg.h.

References width_.

Referenced by loadFromFile().

virtual int ImageJpg::getHeight (  )  [inline, virtual]

Implements Image.

Definition at line 36 of file ImageJpg.h.

References height_.

Referenced by loadFromFile().

virtual int ImageJpg::getAlignment (  )  [inline, virtual]

Implements Image.

Definition at line 37 of file ImageJpg.h.

virtual int ImageJpg::getComponents (  )  [inline, virtual]

Implements Image.

Definition at line 38 of file ImageJpg.h.

References alpha_.

Referenced by createBlankInternal().

void ImageJpg::clear (  ) 

Definition at line 95 of file ImageJpg.cpp.

References bits_, height_, owner_, and width_.

Referenced by createBlankInternal(), and ~ImageJpg().

bool ImageJpg::loadFromFile ( const char *  filename,
bool  readalpha = false 
)

Overwrite the bitmap with the contents of the given file. If alpha is true then any black areas in the bitmap have full opacity. When creating an alpha bitmap the bitmap is created in RGBA format, otherwise in RGB format.

Definition at line 115 of file ImageJpg.cpp.

References NetBuffer::addDataToBuffer(), file, and loadFromBuffer().

Referenced by ImageFactory::loadAlphaImage(), loadFromFile(), and ImageFactory::loadImage().

bool ImageJpg::loadFromFile ( const char *  filename,
const char *  alphafilename,
bool  invert 
)

Definition at line 48 of file ImageJpg.cpp.

References createBlankInternal(), getBits(), getHeight(), getWidth(), and loadFromFile().

bool ImageJpg::loadFromBuffer ( NetBuffer buffer,
bool  readalpha 
)

Definition at line 171 of file ImageJpg.cpp.

References alpha_, bits_, createBlankInternal(), fill_input_buffer(), NetBuffer::getBuffer(), NetBuffer::getBufferUsed(), height_, init_source(), skip_input_data(), term_source(), TRUE, and width_.

Referenced by loadFromFile().

void ImageJpg::createBlankInternal ( int  width,
int  height,
bool  alpha = false,
unsigned char  fill = 255 
) [protected]

Definition at line 103 of file ImageJpg.cpp.

References alpha_, bits_, clear(), getComponents(), height_, and width_.

Referenced by loadFromBuffer(), and loadFromFile().

ImageJpg& ImageJpg::operator= ( ImageJpg other  )  [private]


Member Data Documentation

bool ImageJpg::owner_ [protected]

Definition at line 53 of file ImageJpg.h.

Referenced by clear(), and removeOwnership().

unsigned char* ImageJpg::bits_ [protected]

Definition at line 54 of file ImageJpg.h.

Referenced by clear(), createBlankInternal(), getBits(), and loadFromBuffer().

int ImageJpg::width_ [protected]

Definition at line 55 of file ImageJpg.h.

Referenced by clear(), createBlankInternal(), getWidth(), and loadFromBuffer().

int ImageJpg::height_ [protected]

Definition at line 56 of file ImageJpg.h.

Referenced by clear(), createBlankInternal(), getHeight(), and loadFromBuffer().

bool ImageJpg::alpha_ [protected]

Definition at line 57 of file ImageJpg.h.

Referenced by createBlankInternal(), getComponents(), and loadFromBuffer().


The documentation for this class was generated from the following files:
Generated on Mon Feb 16 15:15:03 2009 for Scorched3D by  doxygen 1.5.3