#include <ImageJpg.h>

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) | |
| ImageJpg & | operator= (ImageJpg &other) |
Definition at line 27 of file ImageJpg.h.
| ImageJpg::ImageJpg | ( | ) |
Definition at line 41 of file ImageJpg.cpp.
| ImageJpg::~ImageJpg | ( | ) | [virtual] |
| ImageJpg::ImageJpg | ( | ImageJpg & | other | ) | [private] |
| virtual void ImageJpg::removeOwnership | ( | ) | [inline, virtual] |
| 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] |
| 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().
bool ImageJpg::owner_ [protected] |
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().
1.5.3