#include <fipImage.h>
List of all members.
Public Member Functions |
| fipImage () |
| fipImage (FREE_IMAGE_TYPE type, const unsigned long ulWidth, const unsigned long ulHeight, const unsigned int uiBitsPerPixel) |
| fipImage (const fipImage &inFipImage) |
| ~fipImage () |
unsigned long | getWidth () const |
unsigned long | getHeight () const |
unsigned int | getBitsPerPixel () const |
bool | isGrayscale () const |
FREE_IMAGE_COLOR_TYPE | getColorType () const |
unsigned long | getPaletteSize () const |
RGBQUAD * | getPalette () const |
bool | hasFileBkColor () const |
bool | getFileBkColor (RGBQUAD *colorValue) const |
bool | setFileBkColor (RGBQUAD *colorValue) |
bool | getPixelColor (const unsigned long ulX, const unsigned long ulY, RGBQUAD *colorValue) const |
bool | setPixelColor (const unsigned long ulX, const unsigned long ulY, RGBQUAD *colorValue) |
bool | getPixelIndex (const unsigned long ulX, const unsigned long ulY, BYTE *colorIndexValue) const |
bool | setPixelIndex (const unsigned long ulX, const unsigned long ulY, BYTE *colorIndexValue) |
bool | convertToGrayscale () |
bool | isTransparent () |
void | setTransparent (bool bEnabled) |
bool | load (const char *szFile) |
void | unload () |
bool | save (const char *szFile) const |
Detailed Description
Warper class for FreeImage image data
Definition at line 50 of file fipImage.h.
Constructor & Destructor Documentation
standard constructor of an fipImage object
fipImage::fipImage |
( |
FREE_IMAGE_TYPE |
type, |
|
|
const unsigned long |
ulWidth, |
|
|
const unsigned long |
ulHeight, |
|
|
const unsigned int |
uiBitsPerPixel |
|
) |
| |
parameter constructor of an fipImage object
- Parameters:
-
type | the type of the image of the fipImage to create |
ulWidth | the width of the image (in points) of the fipImage to create |
ulHeight | the height of the image (in points) of the fipImage to create |
uiBitsPerPixel | the number of bits per pixel for the color of the fipImage to create |
fipImage::fipImage |
( |
const fipImage & |
inFipImage | ) |
|
copy constructor
- Parameters:
-
inFipImage | the fip image to copy |
Member Function Documentation
bool fipImage::convertToGrayscale |
( |
| ) |
|
This method converts the image to grayscale.
- Returns:
- true if the image was converted to grayscale, else false
unsigned int fipImage::getBitsPerPixel |
( |
| ) |
const |
- Returns:
- the number of bits per pixel for the color
FREE_IMAGE_COLOR_TYPE fipImage::getColorType |
( |
| ) |
const |
- Returns:
- the color type of the picture
bool fipImage::getFileBkColor |
( |
RGBQUAD * |
colorValue | ) |
const |
This method returns the background color value of the picture.
- Parameters:
-
colorValue | a pointer to the color value field wher to store the background color value |
- Returns:
- true if the background color was evalued, else false
unsigned long fipImage::getHeight |
( |
| ) |
const |
- Returns:
- the height of the image (in points)
RGBQUAD* fipImage::getPalette |
( |
| ) |
const |
- Returns:
- the array of the color palette (every entry is an color)
unsigned long fipImage::getPaletteSize |
( |
| ) |
const |
- Returns:
- the number of entries in the color palette
bool fipImage::getPixelColor |
( |
const unsigned long |
ulX, |
|
|
const unsigned long |
ulY, |
|
|
RGBQUAD * |
colorValue |
|
) |
| const |
This method returns the color on the given position.
- Parameters:
-
ulX | the horizontal (x) position, from which to get the color |
ulY | the vertical (y) position, from which to get the color |
colorValue | a pointer to the color value field wher to store the color value |
- Returns:
- true if pixel color was evalued, else false
bool fipImage::getPixelIndex |
( |
const unsigned long |
ulX, |
|
|
const unsigned long |
ulY, |
|
|
BYTE * |
colorIndexValue |
|
) |
| const |
This method returns the color index value on the given position.
- Parameters:
-
ulX | the horizontal (x) position, from which to get the color index |
ulY | the vertical (y) position, from which to get the color index |
colorValue | a pointer to the color index value field wher to store the color index value |
- Returns:
- true if pixel color index was evalued, else false
unsigned long fipImage::getWidth |
( |
| ) |
const |
- Returns:
- the width of the image (in points)
bool fipImage::hasFileBkColor |
( |
| ) |
const |
- Returns:
- if the picture has an background color, else false
bool fipImage::isGrayscale |
( |
| ) |
const |
- Returns:
- true if the picture is in grayscale else false
bool fipImage::isTransparent |
( |
| ) |
|
- Returns:
- true if transparency is enabled, else false
bool fipImage::load |
( |
const char * |
szFile | ) |
|
This method loads the image from an given file. The image type will determined by the file ending and its contained data.
- Parameters:
-
szFile | the path of the image file to load |
- Returns:
- true if the image data was loaded, else false
bool fipImage::save |
( |
const char * |
szFile | ) |
const |
This method saves the image to an given file. The image type will determined by the file ending.
- Parameters:
-
szFile | the path of the image file to save |
- Returns:
- true if the image data was saved, else false
bool fipImage::setFileBkColor |
( |
RGBQUAD * |
colorValue | ) |
|
This method sets the background color value of the picture.
- Parameters:
-
colorValue | the color value to set |
- Returns:
- true if the background color was set, else false
bool fipImage::setPixelColor |
( |
const unsigned long |
ulX, |
|
|
const unsigned long |
ulY, |
|
|
RGBQUAD * |
colorValue |
|
) |
| |
This method sets the color on the given position.
- Parameters:
-
ulX | the horizontal (x) position, on which to set the color |
ulY | the vertical (y) position, on which to set the color |
colorValue | a pointer to the color value field to set |
- Returns:
- true if pixel color was set, else false
bool fipImage::setPixelIndex |
( |
const unsigned long |
ulX, |
|
|
const unsigned long |
ulY, |
|
|
BYTE * |
colorIndexValue |
|
) |
| |
This method sets the color index value on the given position.
- Parameters:
-
ulX | the horizontal (x) position, on which to set the color index |
ulY | the vertical (y) position, on which to set the color index |
colorValue | a pointer to the color index value field to set |
- Returns:
- true if pixel color index was set, else false
void fipImage::setTransparent |
( |
bool |
bEnabled | ) |
|
This method sets if transparency should be enabled for the image.
- Parameters:
-
bEnabled | if transparency should be enabled |
void fipImage::unload |
( |
| ) |
|
Deletes previously loaded image data.
Member Data Documentation
bool fipImage::bFreeImageInitialised |
|
staticprivate |
This flag is true if the FreeImage system was initialised, else false.
Definition at line 56 of file fipImage.h.
FIBITMAP* fipImage::pImageData |
|
private |
The pointer to the data of the image.
Definition at line 68 of file fipImage.h.
unsigned long fipImage::ulImageInstances |
|
staticprivate |
The counter for the number of instances of this class. If no instance exists anymore the FreeImage system will be deinitialised.
Definition at line 63 of file fipImage.h.
The documentation for this class was generated from the following file: