imImage
[Image Representation]
Detailed Description
- Base definitions and functions for image representation.
Only the image processing operations depends on these definitions, Image Storage and Image Capture are completely independent.
- You can also initialize a structure with your own memory buffer, see imImageInit. To release the structure without releasing the buffer, set "data[0]" to 0 before calling imImageDestroy.
- See im_image.h
Modules | |
Image Conversion | |
Data Structures | |
struct | _imImage |
imImage Structure Definition. More... | |
Defines | |
#define | imPutBitmap(_image, _x, _y, _w, _h, _xmin, _xmax, _ymin, _ymax) |
Typedefs | |
typedef _imImage | imImage |
Functions | |
imImage * | imImageCreate (int width, int height, int color_space, int data_type) |
imImage * | imImageInit (int width, int height, int color_space, int data_type, void *data_buffer, long *palette, int palette_count) |
void | imImageDestroy (imImage *image) |
void | imImageReshape (imImage *image, int width, int height) |
void | imImageCopy (const imImage *src_image, imImage *dst_image) |
void | imImageCopyData (const imImage *src_image, imImage *dst_image) |
imImage * | imImageDuplicate (const imImage *image) |
imImage * | imImageClone (const imImage *image) |
void | imImageSetAttribute (imImage *image, const char *attrib, int data_type, int count, const void *data) |
const void * | imImageGetAttribute (const imImage *image, const char *attrib, int *data_type, int *count) |
void | imImageGetAttributeList (const imImage *image, char **attrib, int *attrib_count) |
void | imImageClear (imImage *image) |
int | imImageIsBitmap (const imImage *image) |
void | imImageSetPalette (imImage *image, long *palette, int palette_count) |
void | imImageCopyAttributes (const imImage *src_image, imImage *dst_image) |
int | imImageMatchSize (const imImage *image1, const imImage *image2) |
int | imImageMatchColor (const imImage *image1, const imImage *image2) |
int | imImageMatchDataType (const imImage *image1, const imImage *image2) |
int | imImageMatchColorSpace (const imImage *image1, const imImage *image2) |
int | imImageMatch (const imImage *image1, const imImage *image2) |
void | imImageSetBinary (imImage *image) |
void | imImageMakeBinary (imImage *image) |
Define Documentation
|
Value: { \ if (_image->color_space == IM_RGB) \ cdPutImageRectRGB(_image->width, _image->height, \ (unsigned char*)_image->data[0], \ (unsigned char*)_image->data[1], \ (unsigned char*)_image->data[2], \ _x, _y, _w, _h, _xmin, _xmax, _ymin, _ymax); \ else \ cdPutImageRectMap(_image->width, _image->height, \ (unsigned char*)_image->data[0], _image->palette, \ _x, _y, _w, _h, _xmin, _xmax, _ymin, _ymax); \ } |
Typedef Documentation
|
imImage Structure Definition.
|
Function Documentation
|
Creates a new image. |
|
Initializes the image structure but does not allocates image data. |
|
Destroys the image and frees the memory used. image data is destroyed only if its data[0] is not NULL. |
|
Changes the buffer size. Reallocate internal buffers if they are larger than original. |
|
Copy image data and attributes from one image to another. |
|
Copy image data only one image to another. |
|
Creates a copy of the image. |
|
Creates a clone of the image. i.e. same attributes but ignore contents. |
|
Changes an extended attribute. |
|
Returns an extended attribute. |
|
Returns a list of the attribute names. |
|
Sets all image data to zero. |
|
Indicates that the image can be viewed in common graphic devices. Data type must be IM_BYTE. Color mode can be IM_RGB, IM_MAP, IM_GRAY or IM_BINARY. |
|
Changes the image palette. This will destroy the existing palette and replace it with the given palette buffer. |
|
Copies the image attributes from src to dst. |
|
Returns 1 if the images match width and height. Returns 0 otherwise. |
|
Returns 1 if the images match color mode and data type. Returns 0 otherwise. |
|
Returns 1 if the images match width, height and data type. Returns 0 otherwise. |
|
Returns 1 if the images match width, height and color space. Returns 0 otherwise. |
|
Returns 1 if the images match in width, height, data type and color space. Returns 0 otherwise. |
|
Changes the image space from gray to binary by just changing color_space and the palette. |
|
Changes a gray data into a binary data. |