Crystal Space: csImageManipulate Class Reference (Crystal Space Public API Reference)

| ## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# csImageManipulate Class Reference
[Graphics]

Helper class to manipulate iImage objects. More...

`#include <csgfx/imagemanipulate.h>`

List of all members.

## Static Public Member Functions
static csRef< iImage > | Blur (iImage *source, csRGBpixel *transp=0)
| Return a blurred version of the image.
static csRef< iImage > | Crop (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.
static csRef< iImage > | Mipmap (iImage *source, int step, csRGBpixel *transp=0)
| Create a new iImage which is a mipmapped version of this one.
static csRef< iImage > | Rescale (iImage *source, int NewWidth, int NewHeight, int NewDepth=1)
| Rescale an image to the given size.
static csRef< iImage > | Sharpen (iImage *source, int strength, csRGBpixel *transp=0)
| Create a sharpened copy of the image.

## 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

static csRef<iImage> csImageManipulate::Blur | ( | iImage * | source,
|  | csRGBpixel * | transp = `0` |
| ) |  |  | `[static]`

Return a blurred version of the image.

static 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.

static 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.

static csRef<iImage> csImageManipulate::Rescale | ( | iImage * | source,
|  | int | NewWidth,
|  | int | NewHeight,
|  | int | NewDepth = `1` |
| ) |  |  | `[static]`

Rescale an image to the given size.

static 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:

- csgfx/imagemanipulate.h