#include <image.h>
Inheritance diagram for LIBCP::Image:

Public Member Functions | |
| Uint8 * | pixel (int x, int y) |
| void | lock () |
| void | unlock () |
| int | depth () |
| int | pitch () |
| bool | isValidPixel (int x, int y) |
| void | setBuffer (void *buffer) |
| Image & | operator= (Image &i) |
| void * | getBuffer () |
Static Public Member Functions | |
| Image * | createImage (int width, int height, int type) |
| Image * | createImage (void *buffer, int width, int height, int type) |
|
||||||||||||||||||||
|
Creates an image instance from a given image data buffer. buffer is the data buffer. For a color image the data should be aranged as RBG(A) for each pixel. The values are unsigned chars width is the physical width of the image height is the physical height of the image type is one of BaseImage::BINARY, BaseImage::GRAY, BaseImage::COLOR24 or BaseImage::COLOR32 a pointer to the newly create image instance |
|
||||||||||||||||
|
Creates an image instance with empty (black) buffer width is the physical width of the image height is the physical height of the image type is one of BaseImage::BINARY, BaseImage::GRAY, BaseImage::COLOR24 or BaseImage::COLOR32 a pointer to the newly create image instance |
|
|
Returns the depth of this image in byte per pixel (1,3 or 4) the depth as integer |
|
|
Returns a pointer to the images data buffer a void pointer |
|
||||||||||||
|
Checks if the coordinates correspond to a valid pixel in the image x the x coordinate of the pixel to check y the x coordinate of the pixel to check true if the pixel is inside the image, otherwise false |
|
|
Locks this image. You should always lock images before performing any operation on it. All build in library functions lock and unlock the image correctly already. So if you are just using library functions, you do not have to worry about it. unlock Reimplemented from LIBCP::BaseImage. |
|
|
The overloaded equal operator for the image class |
|
|
Returns the pitch of this image. The pitch is basicly the width multiplied with the depth. It corresponds to the memory needed for one row of the image. the pitch of the image |
|
||||||||||||
|
Returns a pointer to the position in the image buffer where pixel (x,y) is stored. Use pixel(x,y)[0] for the red part of the pixel color. pixel(x,y)[1], pixel(x,y)[2] are green and blue. For images with 32bit depth pixel(x,y)[3] is the alpha value. |
|
|
Sets a new data buffer for this image. Be carefull with that, since no checking for the image width, height and type is done. |
|
|
Unlocks this image. You should always lock images before performing any operation on it. All build in library functions lock and unlock the image correctly already. So if you are just using library functions, you do not have to worry about it. lock Reimplemented from LIBCP::BaseImage. |
1.3.7