CrystalSpace

Public API Reference

Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

csImageManipulate Class Reference
[Graphics]

Helper class to manipulate iImage objects. More...

#include <csgfx/imagemanipulate.h>

List of all members.

Static Public Member Functions

csRef< iImageRescale (iImage *source, int NewWidth, int NewHeight, int NewDepth=1)
 Rescale an image to the given size.
csRef< iImageMipmap (iImage *source, int step, csRGBpixel *transp=0)
 Create a new iImage which is a mipmapped version of this one.
csRef< iImageBlur (iImage *source, csRGBpixel *transp=0)
 Return a blurred version of the image.
csRef< iImageCrop (iImage *source, int x, int y, int width, int height)
 Create a new image and copy a subpart of the actual image into the new image.
csRef< iImageSharpen (iImage *source, int strength, csRGBpixel *transp=0)
 Create a sharpened copy of the image.
csRef< iImageRenderKeycolorToAlpha (iImage *source, const csRGBpixel &transpColor, const csRGBpixel &fillColor)
 Set alpha of all pixels to 0 that match transpColor.


Detailed Description

Helper class to manipulate iImage objects.

The methods in this class generally return new images.

Definition at line 38 of file imagemanipulate.h.


Member Function Documentation

csRef<iImage> csImageManipulate::Blur iImage source,
csRGBpixel transp = 0
[static]
 

Return a blurred version of the image.

csRef<iImage> csImageManipulate::Crop iImage source,
int  x,
int  y,
int  width,
int  height
[static]
 

Create a new image and copy a subpart of the actual image into the new image.

csRef<iImage> csImageManipulate::Mipmap iImage source,
int  step,
csRGBpixel transp = 0
[static]
 

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 the original image. 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.

csRef<iImage> csImageManipulate::RenderKeycolorToAlpha iImage source,
const csRGBpixel transpColor,
const csRGBpixel fillColor
[static]
 

Set alpha of all pixels to 0 that match transpColor.

Pixels that have non-transparent neighbours will be set to the mean color of all non-transparent neighbours, otherwise to fillColor.

Remarks:
Intermediately uses a truecolor images, i.e. paletted images are not handled with maximum efficiency.

csRef<iImage> csImageManipulate::Rescale iImage source,
int  NewWidth,
int  NewHeight,
int  NewDepth = 1
[static]
 

Rescale an image to the given size.

csRef<iImage> csImageManipulate::Sharpen iImage source,
int  strength,
csRGBpixel transp = 0
[static]
 

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.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.3.9.1