![]() |
Public API Reference |
#include <image.h>
Inheritance diagram for iImage:
Public Methods | |
virtual void * | GetImageData ()=0 |
Get image data: returns either (csRGBpixel *) or (unsigned char *) depending on format. More... | |
virtual int | GetWidth ()=0 |
Query image width. More... | |
virtual int | GetHeight ()=0 |
Query image height. More... | |
virtual int | GetSize ()=0 |
Query image size in bytes. More... | |
virtual void | Rescale (int NewWidth, int NewHeight)=0 |
Rescale the image to the given size. More... | |
virtual csPtr< iImage > | MipMap (int step, csRGBpixel *transp)=0 |
Create a new iImage which is a mipmapped version of this one. More... | |
virtual void | SetName (const char *iName)=0 |
Set image file name. More... | |
virtual const char * | GetName ()=0 |
Get image file name. More... | |
virtual int | GetFormat ()=0 |
Qyery image format (see CS_IMGFMT_XXX above). More... | |
virtual csRGBpixel * | GetPalette ()=0 |
Get image palette (or NULL if no palette). More... | |
virtual uint8 * | GetAlpha ()=0 |
Get alpha map for 8-bit paletted image. More... | |
virtual void | SetFormat (int iFormat)=0 |
Convert the image to another format. More... | |
virtual csPtr< iImage > | Clone ()=0 |
Create yet another image and copy this one into the new image. More... | |
virtual csPtr< iImage > | Crop (int x, int y, int width, int height)=0 |
Create a new image and copy a subpart of the actual image into the new image. More... | |
virtual void | CheckAlpha ()=0 |
Check if all alpha values are "non-transparent" and if so, discard alpha. More... | |
virtual bool | HasKeycolor ()=0 |
check if image has a keycolour stored with it. More... | |
virtual void | GetKeycolor (int &r, int &g, int &b)=0 |
get the keycolour stored with the image. More... | |
virtual csPtr< iImage > | Sharpen (csRGBpixel *transp, int strength)=0 |
Create a sharpened copy of the image. More... | |
virtual int | HasMipmaps ()=0 |
Returns the number of mipmaps contained in the image (in case there exist any precalculated mipmaps. More... |
Crystal Space supports loading of images in GIF, JPEG, PNG, SGI etc formats, you can work with any image through this interface.
Definition at line 71 of file image.h.
|
Check if all alpha values are "non-transparent" and if so, discard alpha.
Implemented in csImageFile. |
|
Create yet another image and copy this one into the new image.
Implemented in csImageFile. |
|
Create a new image and copy a subpart of the actual image into the new image.
Implemented in csImageFile. |
|
Get alpha map for 8-bit paletted image. RGBA images contains alpha within themself. If image has no alpha map, or the image is in RGBA format, this function will return NULL. Implemented in csImageFile. |
|
Qyery image format (see CS_IMGFMT_XXX above).
Implemented in csImageFile. |
|
Query image height.
Implemented in csImageFile. |
|
Get image data: returns either (csRGBpixel *) or (unsigned char *) depending on format. Note that for RGBA images the csRGBpixel structure contains the alpha channel as well, so GetAlpha (see below) method will return NULL (because alpha is not stored separately, as for paletted images). Implemented in csImageFile. |
|
get the keycolour stored with the image.
Implemented in csImageFile. |
|
Get image file name.
Implemented in csImageFile. |
|
Get image palette (or NULL if no palette).
Implemented in csImageFile. |
|
Query image size in bytes.
Implemented in csImageFile. |
|
Query image width.
Implemented in csImageFile. |
|
check if image has a keycolour stored with it.
Implemented in csImageFile. |
|
Returns the number of mipmaps contained in the image (in case there exist any precalculated mipmaps.
Implemented in csImageFile. |
|
Create a new iImage which is a mipmapped version of this one. 'step' indicates how much the mipmap should be scaled down. Step 0 returns a blurred version of the image without image being scaled down. Step 1 scales the image down to 1/2. Steps > 1 repeat this 'step' times. The new image will have same format as the original one. If you pass a pointer to a transparent color, the texels of that color are handled differently. Implemented in csImageFile. |
|
Rescale the image to the given size.
Implemented in csImageFile. |
|
Convert the image to another format. This method will allocate a respective color component if it was not allocated before. For example, you can use this method to add alpha channel to paletted images, to allocate a image for CS_IMGFMT_NONE alphamaps or vice versa, to remove the image and leave alphamap alone. This routine may be used as well for removing alpha channel. Implemented in csImageFile. |
|
Set image file name.
Implemented in csImageFile. |
|
Create a sharpened copy of the image. The effect of 'strength' differs from image to image. Values around 128-512 give good results. On really blurry images values up to 1024 or 2048 can be used. Implemented in csImageFile. |