|
|
Functions | |
| gxi32 | gx_initimage (gxHANDLE handle, gxIMAGE *pimage) |
| Initialization of an image located on the heap or stack. | |
| gxi32 | gx_allocimage (gxHANDLE handle, gxIMAGE **pimage) |
| This function allocates a blank image. | |
| gxi32 | gx_freeimage (gxHANDLE handle, gxIMAGE *pimage) |
| Frees an image structure including the allocated pixel data. | |
| gxi32 | gx_createimage (gxHANDLE handle, gxIMAGE *pimage, gxi32 format, gxi32 xsize, gxi32 ysize, gxi32 sline) |
| Makes an image with proper size and format running on an initialized image structure. | |
| gxi32 | gx_convertimage (gxHANDLE handle, gxIMAGE *pdest, gxIMAGE *psrc, gxi32 format, gxi32 xsize, gxi32 ysize, gxi32 sline) |
| Converts an image to a specific format and size. | |
| gxi32 | gx_zoomimage (gxHANDLE handle, gxIMAGE *pdest, gxi32 xsize, gxi32 ysize, gxi32 sline, gxIMAGE *psrc, gxi32 sx1_8=0, gxi32 sy1_8=0, gxi32 sx2_8=0, gxi32 sy2_8=0) |
| Zooms an image to a specified size. | |
| gxi32 | gx_rotateimage (gxHANDLE handle, gxIMAGE *pdest, gxIMAGE *psrc, gxi32 degree) |
| Rotates an image to a specified degree. | |
| gxi32 | gx_mirrorimage (gxHANDLE handle, gxIMAGE *pdest, gxIMAGE *psrc, gxi32 flags) |
| Mirrors an image to a specified mode. | |
| gxi32 | gx_mirrorimage (gxHANDLE handle, gxIMAGE *pimage, gxi32 flags) |
| Mirrors an image to a specified mode. | |
| gxi32 | gx_loadimage (gxHANDLE handle, gxIMAGE *pimage, const wchar_t *filename, gxi32 pixelformat=GX_UNDEF) |
| Loads an image from a mass storage device and converts it to a specific pixel format (Unicode version). | |
| gxi32 | gx_loadimagea (gxHANDLE handle, gxIMAGE *pimage, const char *filename, gxi32 pixelformat=GX_UNDEF) |
| Loads an image from a mass storage device and converts it to a specific pixel format (ASCII version). | |
| gxi32 | gx_loadimage (gxHANDLE handle, gxIMAGE *pimage, const char *filename, gxi32 pixelformat=GX_UNDEF) |
| Loads an image from a mass storage device and converts it to a specific pixel format (ASCII version). | |
| gxi32 | gx_saveimage (gxHANDLE handle, gxIMAGE *pimage, const wchar_t *filename, gxi32 fileformat) |
| Saves an image to a mass storage device in the specific file format (Unicode version). | |
| gxi32 | gx_saveimagea (gxHANDLE handle, gxIMAGE *pimage, const char *filename, gxi32 fileformat) |
| Saves an image to a mass storage device in the specific file format (ASCII version). | |
| gxi32 | gx_saveimage (gxHANDLE handle, gxIMAGE *pimage, const char *filename, gxi32 fileformat) |
| Saves an image to a mass storage device in the specific file format (ASCII version). | |
| gxi32 | gx_loadfrommem (gxHANDLE handle, gxIMAGE *pimage, const void *buffer, gxi32 buflen, gxi32 pixelformat=GX_UNDEF) |
| Loads an image from the memory and converts it to a specific pixel format. | |
| gxi32 | gx_savetomem (gxHANDLE handle, gxIMAGE *pimage, void **buffer, gxi32 *buflen, gxi32 fileformat) |
| Saves an image in a specific file format to a specific memory area. | |
| gxi32 | gx_isvalidimage (gxHANDLE handle, const gxIMAGE *pimage) |
| Checks if image structure is valid. | |
| gxi32 | gx_copyimage (gxHANDLE handle, gxIMAGE *target, gxIMAGE *source) |
| Copies an image to another. | |
| gxi32 | gx_testimagefileformat (gxHANDLE handle, const wchar_t *filename, gxi32 *fileformat) |
| Tests if a file is an image file. | |
| gxi32 | gx_testimagefileformata (gxHANDLE handle, const char *filename, gxi32 *fileformat) |
| Tests if a file is an image file. | |
| gxi32 | gx_testimagefileformat (gxHANDLE handle, const char *filename, gxi32 *fileformat) |
| Tests if a file is an image file. | |
| gxi32 | gx_testimagefileformatmem (gxHANDLE handle, const void *buffer, gxi32 buflen, gxi32 *fileformat) |
| Tests if a memory area contains an image file. | |
| gxi32 | gx_testimagefileformatid (gxHANDLE handle, const wchar_t *filename, wchar_t *formatid, gxi32 slen) |
| Tests if a file is an image file. | |
| gxi32 | gx_testimagefileformatidmem (gxHANDLE handle, const void *buffer, gxi32 buflen, wchar_t *formatid, gxi32 slen) |
| Tests if a memory area contains an image file. | |
| gxi32 | gx_testimagefileformat (gxHANDLE handle, const void *buffer, gxi32 buflen, gxi32 *fileformat) |
| Tests if a memory area contains an image file. | |
| gxi32 | gx_initimage (gxIMAGE *pimage) |
| Initialization of an image located on a heap or a stack. | |
| gxi32 | gx_allocimage (gxIMAGE **pimage) |
| This function allocates a blank image. | |
| gxi32 | gx_freeimage (gxIMAGE *pimage) |
| Frees an image structure including the allocated pixel data. | |
| gxi32 | gx_createimage (gxIMAGE *pimage, gxi32 format, gxi32 xsize, gxi32 ysize, gxi32 sline) |
| Makes an image with proper size and format running on an initialized image structure. | |
| gxi32 | gx_convertimage (gxIMAGE *pdest, gxIMAGE *psrc, gxi32 format, gxi32 xsize, gxi32 ysize, gxi32 sline) |
| Converts an image to a specific format and size. | |
| gxi32 | gx_zoomimage (gxIMAGE *pdest, gxi32 xsize, gxi32 ysize, gxi32 sline, gxIMAGE *psrc, gxi32 sx1_8=0, gxi32 sy1_8=0, gxi32 sx2_8=0, gxi32 sy2_8=0) |
| Zooms an image to a specified size. | |
| gxi32 | gx_rotateimage (gxIMAGE *pdest, gxIMAGE *psrc, gxi32 degree) |
| Rotates an image to a specified degree. | |
| gxi32 | gx_mirrorimage (gxIMAGE *pdest, gxIMAGE *psrc, gxi32 flags) |
| Mirrors an image to a specified mode. | |
| gxi32 | gx_mirrorimage (gxIMAGE *pimage, gxi32 flags) |
| Mirrors an image to a specified mode. | |
| gxi32 | gx_loadimage (gxIMAGE *pimage, const wchar_t *filename, gxi32 pixelformat=GX_UNDEF) |
| Loads an image from a mass storage device and converts it to a specific pixel format (Unicode version). | |
| gxi32 | gx_loadimage (gxIMAGE *pimage, const char *filename, gxi32 pixelformat=GX_UNDEF) |
| Loads an image from a mass storage device and converts it to a specific pixel format (ASCII version). | |
| gxi32 | gx_saveimage (gxIMAGE *pimage, const wchar_t *filename, gxi32 fileformat) |
| Saves an image to a mass storage device in the specific file format (Unicode version). | |
| gxi32 | gx_saveimage (gxIMAGE *pimage, const char *filename, gxi32 fileformat) |
| Saves an image to a mass storage device in the specific file format (ASCII version). | |
| gxi32 | gx_loadfrommem (gxIMAGE *pimage, const void *buffer, gxi32 buflen, gxi32 pixelformat=GX_UNDEF) |
| Loads an image from the memory and converts it to a specific pixel format. | |
| gxi32 | gx_savetomem (gxIMAGE *pimage, void **buffer, gxi32 *buflen, gxi32 fileformat) |
| Saves an image in a specific file format to a specific memory area. | |
| gxi32 | gx_isvalidimage (const gxIMAGE *pimage) |
| Checks if image structure is valid. | |
| gxi32 | gx_copyimage (gxIMAGE *target, gxIMAGE *source) |
| Copies an image to another. | |
| gxi32 | gx_loadimagefromfile (gxIMAGE *pimage, const wchar_t *filename, gxi32 pixelformat=GX_UNDEF, gxVARIANT properties=0, gxVARIANT comments=0) |
| Loads an image with comments from a mass storage device and converts it to a specific pixel format (Unicode version). | |
| gxi32 | gx_loadimagefromfile (gxIMAGE *pimage, const char *filename, gxi32 pixelformat=GX_UNDEF, gxVARIANT properties=0, gxVARIANT comments=0) |
| Loads an image with comments from a mass storage device and converts it to a specific pixel format (ASCII version). | |
| gxi32 | gx_saveimagetofile (gxIMAGE *pimage, const wchar_t *filename, gxi32 fileformat, gxVARIANT properties=0, gxVARIANT comments=0) |
| Saves an image with comments to a mass storage device in the specific file format (Unicode version). | |
| gxi32 | gx_saveimagetofile (gxIMAGE *pimage, const char *filename, gxi32 fileformat, gxVARIANT properties=0, gxVARIANT comments=0) |
| Saves an image with comments to a mass storage device in the specific file format (ASCII version). | |
| gxi32 | gx_saveimagetofile2 (gxHANDLE handle, gxIMAGE *pimage, const wchar_t *filename, const wchar_t *fileformat, gxVARIANT properties=0, gxVARIANT comments=0) |
| Saves an image with comments to a mass storage device in the specific file format (Unicode version). | |
| gxi32 | gx_loadimagefrommem (gxIMAGE *pimage, const void *buffer, gxi32 buflen, gxi32 pixelformat=GX_UNDEF, gxVARIANT properties=0, gxVARIANT comments=0) |
| Loads an image with comments from the memory and converts it to a specific pixel format. | |
| gxi32 | gx_saveimagetomem (gxIMAGE *pimage, void **buffer, gxi32 *buflen, gxi32 fileformat, gxVARIANT properties=0, gxVARIANT comments=0) |
| Saves an image with comments in a specific file format to a specific memory area. | |
| gxi32 | gx_saveimagetomem2 (gxHANDLE handle, gxIMAGE *pimage, void **buffer, gxi32 *buflen, wchar_t *fileformat, gxVARIANT properties=0, gxVARIANT comments=0) |
| Saves an image with comments in a specific file format to a specific memory area. | |
| gxi32 | gx_testimagefileformat (const wchar_t *filename, gxi32 *fileformat) |
| Tests if a file is an image file. | |
| gxi32 | gx_testimagefileformat (const char *filename, gxi32 *fileformat) |
| Tests if a file is an image file. | |
| gxi32 | gx_testimagefileformat (const void *buffer, gxi32 buflen, gxi32 *fileformat) |
| Tests if a memory area contains an image file. | |
| int | gx_coloradjust (gxHANDLE imgexthandle, gxIMAGE *image, float contrast=0, float brightness=0, float saturation=0, float gamma=1, int flags=0) |
| Makes contrast, brightness, saturation and gamma correction on the image. | |
| int | gx_colormixer (gxHANDLE imgexthandle, gxIMAGE *target, gxIMAGE *source, int r1, int g1, int b1, int r2=0, int g2=0, int b2=0, int r3=0, int g3=0, int b3=0) |
| Changes the colors of the source image based on the weight parameters. | |
| int | gx_imagedifference (gxHANDLE imgexthandle, gxIMAGE *target, gxIMAGE *source1, gxIMAGE *source2) |
| Generates a differential image from two images. | |
| int | gx_imagetransform (gxHANDLE imgexthandle, gxIMAGE *target, gxIMAGE *source, gxPG4 area, void *bgcolor=0) |
| Transforms a general area from the source image in the target image. | |
| int | gx_imageftransform (gxHANDLE imgexthandle, gxIMAGE *target, gxIMAGE *source, gxTRAFO *trafo, void *bgcolor=0) |
| Fine transforms an image with the transformation described by the trafo. | |
| int | gx_imagecompose (gxHANDLE imgexthandle, gxIMAGE *target, gxIMAGE *upper, gxIMAGE *lower, gxPNT position, float alpha_u=1, float alpha_l=1, int flags=0, void *bgcolor=0) |
| Composes two images. | |
| int | gx_drawtext (gxHANDLE imgexthandle, gxIMAGE *image, const char *text, gxPNT position, const char *fonttype, int fontheight, int fontwidth, void *txtcolor, unsigned int flags) |
| Draw text on an image. | |
Initialization of an image located on the heap or stack.
This function fills the structure identifier and the reference counter properly. The other data members are set to zero value.
| handle | Handle of the module. | |
| pimage | Pointer to the not initialized image structure. |
References gx_call().
Referenced by gx_initimage().
This function allocates a blank image.
The structure identifier and the reference counter will be properly filled. The other data members are set to zero value.
| handle | Handle of the module. | |
| pimage | Pointer to a gxIMAGE structure pointer where the function returns the pointer of the allocated image area. |
References gx_call().
Referenced by gxImage::Detach(), gx_allocimage(), and gxImage::gxImage().
Frees an image structure including the allocated pixel data.
If the value of the reference counter is not properly set the function returns an error. In case of dynamically allocated images it is advised to use gx_unrefimage.
| handle | Handle of the module. | |
| pimage | Pointer to the image structure. |
References gx_call().
Referenced by gx_freeimage().
| gxi32 gx_createimage | ( | gxHANDLE | handle, | |
| gxIMAGE * | pimage, | |||
| gxi32 | format, | |||
| gxi32 | xsize, | |||
| gxi32 | ysize, | |||
| gxi32 | sline | |||
| ) | [inline] |
Makes an image with proper size and format running on an initialized image structure.
| handle | Handle of the module. | |
| pimage | Pointer to the image structure. | |
| format | Pixel format (see GX_PIXELFORMATS). | |
| xsize | Horizontal size of image in pixels. | |
| ysize | Vertical size of image in pixels. | |
| sline | Length of a row in bytes (min.: xsize * size of a pixel in bytes). If zero the system computes the correct value. |
References gx_call().
Referenced by gxImage::Create(), and gx_createimage().
| gxi32 gx_convertimage | ( | gxHANDLE | handle, | |
| gxIMAGE * | pdest, | |||
| gxIMAGE * | psrc, | |||
| gxi32 | format, | |||
| gxi32 | xsize, | |||
| gxi32 | ysize, | |||
| gxi32 | sline | |||
| ) | [inline] |
Converts an image to a specific format and size.
The destination image must be initialized.
| handle | Handle of the module. | |
| pdest | Pointer to an initialized image where the function places the converted image. | |
| psrc | Pointer to the source image. | |
| format | Pixel format of the destination image (see GX_PIXELFORMATS). | |
| xsize | Horizontal size of the destination image in pixels. | |
| ysize | Vertical size of the destination image in pixels. | |
| sline | Length of a row in bytes (min.: xsize * size of a pixel in bytes). If zero the system computes the correct value. |
References gx_call().
Referenced by gxImage::Convert(), and gx_convertimage().
| gxi32 gx_zoomimage | ( | gxHANDLE | handle, | |
| gxIMAGE * | pdest, | |||
| gxi32 | xsize, | |||
| gxi32 | ysize, | |||
| gxi32 | sline, | |||
| gxIMAGE * | psrc, | |||
| gxi32 | sx1_8 = 0, |
|||
| gxi32 | sy1_8 = 0, |
|||
| gxi32 | sx2_8 = 0, |
|||
| gxi32 | sy2_8 = 0 | |||
| ) | [inline] |
Zooms an image to a specified size.
| handle | Handle of the module. | |
| pdest | Pointer to an initialized image where the function places the zoomed image. | |
| xsize | Horizontal size of the destination area. | |
| ysize | Vertical size of the destination area. | |
| sline | Size of a row of the destination area. | |
| psrc | Pointer to the source image. | |
| sx1_8 | Left coordinate of the zoomed area (shifted left with 8 bit = 256) | |
| sy1_8 | Top coordinate of the zoomed area (shifted left with 8 bit = 256) | |
| sx2_8 | Right coordinate of the zoomed area (shifted left with 8 bit = 256) | |
| sy2_8 | Bottom coordinate of the zoomed area (shifted left with 8 bit = 256) |
References gx_call().
Referenced by gx_zoomimage(), and gxImage::Zoom().
Rotates an image to a specified degree.
| handle | Handle of the module. | |
| pdest | Pointer to an initialized image where the function places the zoomed image. | |
| psrc | Pointer to the source image. | |
| degree | Degree (Must be 0, 90, 180, 270). |
References gx_call().
Referenced by gx_rotateimage(), and gxImage::Rotate().
Mirrors an image to a specified mode.
| handle | Handle of the module. | |
| pdest | Pointer to an initialized image where the function places the zoomed image. | |
| psrc | Pointer to the source image. | |
| flags | Mirror flags. It can be GX_MIRROR_HORIZONTAL or/and GX_MIRROR_VERTICAL (see GX_MIRRORFLAGS). |
References gx_call().
Referenced by gx_mirrorimage(), and gxImage::Mirror().
Mirrors an image to a specified mode.
| handle | Handle of the module. | |
| pimage | Pointer to an image. | |
| flags | Mirror flags. It can be GX_MIRROR_HORIZONTAL or/and GX_MIRROR_VERTICAL (see GX_MIRRORFLAGS). |
References gx_mirrorimage().
| gxi32 gx_loadimage | ( | gxHANDLE | handle, | |
| gxIMAGE * | pimage, | |||
| const wchar_t * | filename, | |||
| gxi32 | pixelformat = GX_UNDEF | |||
| ) | [inline] |
Loads an image from a mass storage device and converts it to a specific pixel format (Unicode version).
On loading a RAW image, the gxIMAGE must be created with correct parameters (sline parameter also included). The format parameter of the gx_loadimage() must be -1 for RAW images.
gxIMAGE image; gx_initimage(&image); gx_createimage(&image, GX_GRAY, 1024, 768, 1024); gx_loadimage(&image, "test.raw", -1); ...
| handle | Handle of the module. | |
| pimage | Pointer to an initialized image structure where the function loads the data. | |
| filename | Name of the image file. | |
| pixelformat | The specific pixel format. Giving GX_GRAY converts a color image to grayscale (see GX_PIXELFORMATS). |
References gx_call().
Referenced by gx_loadimage(), and gxImage::Load().
| gxi32 gx_loadimagea | ( | gxHANDLE | handle, | |
| gxIMAGE * | pimage, | |||
| const char * | filename, | |||
| gxi32 | pixelformat = GX_UNDEF | |||
| ) | [inline] |
Loads an image from a mass storage device and converts it to a specific pixel format (ASCII version).
On loading a RAW image, the gxIMAGE must be created with correct parameters (sline parameter also included). The format parameter of the gx_loadimage() must be -1 for RAW images.
gxIMAGE image; gx_initimage(&image); gx_createimage(&image, GX_GRAY, 1024, 768, 1024); gx_loadimagea(&image, "test.raw", -1); ...
| handle | Handle of the module. | |
| pimage | Pointer to an initialized image structure where the function loads the data. | |
| filename | Name of the image file. | |
| pixelformat | The specific pixel format. Giving GX_GRAY converts a color image to grayscale (see GX_PIXELFORMATS). |
References gx_call().
Referenced by gx_loadimage().
| gxi32 gx_loadimage | ( | gxHANDLE | handle, | |
| gxIMAGE * | pimage, | |||
| const char * | filename, | |||
| gxi32 | pixelformat = GX_UNDEF | |||
| ) | [inline] |
Loads an image from a mass storage device and converts it to a specific pixel format (ASCII version).
On loading a RAW image, the gxIMAGE must be created with correct parameters (sline parameter also included). The format parameter of the gx_loadimage() must be -1 for RAW images.
gxIMAGE image; gx_initimage(&image); gx_createimage(&image, GX_GRAY, 1024, 768, 1024); gx_loadimage(&image, "test.raw", -1); ...
| handle | Handle of the module. | |
| pimage | Pointer to an initialized image structure where the function loads the data. | |
| filename | Name of the image file. | |
| pixelformat | The specific pixel format. Giving GX_GRAY converts a color image to grayscale (see GX_PIXELFORMATS). |
References gx_loadimagea().
| gxi32 gx_saveimage | ( | gxHANDLE | handle, | |
| gxIMAGE * | pimage, | |||
| const wchar_t * | filename, | |||
| gxi32 | fileformat | |||
| ) | [inline] |
Saves an image to a mass storage device in the specific file format (Unicode version).
| handle | Handle of the module. | |
| pimage | Pointer to the image. | |
| filename | Name of the image file. | |
| fileformat | Format of the image file (see GX_IMGFILEFORMATS). |
References gx_call().
Referenced by gx_saveimage(), and gxImage::Save().
| gxi32 gx_saveimagea | ( | gxHANDLE | handle, | |
| gxIMAGE * | pimage, | |||
| const char * | filename, | |||
| gxi32 | fileformat | |||
| ) | [inline] |
Saves an image to a mass storage device in the specific file format (ASCII version).
| handle | Handle of the module. | |
| pimage | Pointer to the image. | |
| filename | Name of the image file. | |
| fileformat | Format of the image file (see GX_IMGFILEFORMATS). |
References gx_call().
Referenced by gx_saveimage().
| gxi32 gx_saveimage | ( | gxHANDLE | handle, | |
| gxIMAGE * | pimage, | |||
| const char * | filename, | |||
| gxi32 | fileformat | |||
| ) | [inline] |
Saves an image to a mass storage device in the specific file format (ASCII version).
| handle | Handle of the module. | |
| pimage | Pointer to the image. | |
| filename | Name of the image file. | |
| fileformat | Format of the image file (see GX_IMGFILEFORMATS). |
References gx_saveimagea().
| gxi32 gx_loadfrommem | ( | gxHANDLE | handle, | |
| gxIMAGE * | pimage, | |||
| const void * | buffer, | |||
| gxi32 | buflen, | |||
| gxi32 | pixelformat = GX_UNDEF | |||
| ) | [inline] |
Loads an image from the memory and converts it to a specific pixel format.
On loading a RAW image, the gxIMAGE must be created with correct parameters (sline parameter also included). The format parameter of the gx_loadfrommem() must be -1 for RAW images.
| handle | Handle of the module. | |
| pimage | Pointer to an initialized image structure where the function loads the data. | |
| buffer | Pointer to the image data. | |
| buflen | Length of image data in bytes. | |
| pixelformat | The specific pixel format. Giving GX_GRAY converts a color image to grayscale (see GX_PIXELFORMATS). |
References gx_call().
Referenced by gx_loadfrommem(), and gxImage::LoadFromMem().
| gxi32 gx_savetomem | ( | gxHANDLE | handle, | |
| gxIMAGE * | pimage, | |||
| void ** | buffer, | |||
| gxi32 * | buflen, | |||
| gxi32 | fileformat | |||
| ) | [inline] |
Saves an image in a specific file format to a specific memory area.
| handle | Handle of the module. | |
| pimage | Pointer to the image. | |
| buffer | Pointer to the memory area pointer that is large enough or NULL. | |
| buflen | Size of the memory area. | |
| fileformat | Format of the image file (see GX_IMGFILEFORMATS). |
References gx_call().
Referenced by gx_savetomem(), and gxImage::SaveToMem().
Checks if image structure is valid.
| handle | Handle of the module. | |
| pimage | Pointer to the image. |
References gx_call().
Referenced by gx_isvalidimage(), and gxImage::IsValid().
Copies an image to another.
| handle | Handle of the module. | |
| target | Pointer to the initialized destination image. | |
| source | Pointer to the source image. |
References gx_call().
Referenced by gxImage::Copy(), and gx_copyimage().
| gxi32 gx_testimagefileformat | ( | gxHANDLE | handle, | |
| const wchar_t * | filename, | |||
| gxi32 * | fileformat | |||
| ) | [inline] |
Tests if a file is an image file.
| handle | Handle of the module. | |
| filename | Name of the file to test. | |
| fileformat | Buffer for the fileformat. -1 is returned for unknown file type. |
References gx_call().
Referenced by gx_testimagefileformat(), and gxImage::TestImageFileFormat().
| gxi32 gx_testimagefileformata | ( | gxHANDLE | handle, | |
| const char * | filename, | |||
| gxi32 * | fileformat | |||
| ) | [inline] |
Tests if a file is an image file.
| handle | Handle of the module. | |
| filename | Name of the file to test. | |
| fileformat | Buffer for the fileformat. -1 is returned for unknown file type. |
References gx_call().
Referenced by gx_testimagefileformat().
| gxi32 gx_testimagefileformat | ( | gxHANDLE | handle, | |
| const char * | filename, | |||
| gxi32 * | fileformat | |||
| ) | [inline] |
Tests if a file is an image file.
| handle | Handle of the module. | |
| filename | Name of the file to test. | |
| fileformat | Buffer for the fileformat. -1 is returned for unknown file type. |
References gx_testimagefileformata().
| gxi32 gx_testimagefileformatmem | ( | gxHANDLE | handle, | |
| const void * | buffer, | |||
| gxi32 | buflen, | |||
| gxi32 * | fileformat | |||
| ) | [inline] |
Tests if a memory area contains an image file.
| handle | Handle of the module. | |
| buffer | Pointer to the memory area. | |
| buflen | Size of the memory area. | |
| fileformat | Buffer for the fileformat. -1 is returned for unknown file type. |
References gx_call().
Referenced by gx_testimagefileformat().
| gxi32 gx_testimagefileformatid | ( | gxHANDLE | handle, | |
| const wchar_t * | filename, | |||
| wchar_t * | formatid, | |||
| gxi32 | slen | |||
| ) | [inline] |
Tests if a file is an image file.
| handle | Handle of the module. | |
| filename | Name of the file to test. | |
| formatid | Buffer for the formatid. "" is returned for unknown file type. | |
| slen | Buffer length for formatid. |
References gx_call().
| gxi32 gx_testimagefileformatidmem | ( | gxHANDLE | handle, | |
| const void * | buffer, | |||
| gxi32 | buflen, | |||
| wchar_t * | formatid, | |||
| gxi32 | slen | |||
| ) | [inline] |
Tests if a memory area contains an image file.
| handle | Handle of the module. | |
| buffer | Pointer to the memory area. | |
| buflen | Size of the memory area. | |
| formatid | Buffer for the formatid. "" is returned for unknown file type. | |
| slen | Buffer length for formatid. |
References gx_call().
| gxi32 gx_testimagefileformat | ( | gxHANDLE | handle, | |
| const void * | buffer, | |||
| gxi32 | buflen, | |||
| gxi32 * | fileformat | |||
| ) | [inline] |
Tests if a memory area contains an image file.
| handle | Handle of the module. | |
| buffer | Pointer to the memory area. | |
| buflen | Size of the memory area. | |
| fileformat | Buffer for the fileformat. -1 is returned for unknown file type. |
References gx_testimagefileformatmem().
| gxi32 gx_initimage | ( | gxIMAGE * | pimage | ) | [inline] |
Initialization of an image located on a heap or a stack.
This function fills the structure identifier and the reference counter properly. The other data members are set to zero value.
| pimage | Pointer to the ininitialized image structure. |
References gx_direct(), and gx_initimage().
| gxi32 gx_allocimage | ( | gxIMAGE ** | pimage | ) | [inline] |
This function allocates a blank image.
The structure identifier and the reference counter will be properly filled. The other data members are set zero value.
| pimage | Pointer to a gxIMAGE structure pointer where the function returns the pointer of the allocated image area. |
References gx_allocimage(), and gx_direct().
| gxi32 gx_freeimage | ( | gxIMAGE * | pimage | ) | [inline] |
Frees an image structure including the allocated pixel data.
If the value of the reference counter is not properly set the function returns an error. In case of dynamically allocated images it is advised to use gx_unrefimage.
| pimage | Pointer to the image structure. |
References gx_direct(), and gx_freeimage().
| gxi32 gx_createimage | ( | gxIMAGE * | pimage, | |
| gxi32 | format, | |||
| gxi32 | xsize, | |||
| gxi32 | ysize, | |||
| gxi32 | sline | |||
| ) | [inline] |
Makes an image with proper size and format running on an initialized image structure.
| pimage | Pointer to the image structure. | |
| format | Pixel format (see GX_PIXELFORMATS). | |
| xsize | Horizontal size of image in pixels. | |
| ysize | Vertical size of image in pixels. | |
| sline | Length of a row in bytes (min.: xsize * size of a pixel in bytes). If zero the system computes the correct value. |
References gx_createimage(), and gx_direct().
| gxi32 gx_convertimage | ( | gxIMAGE * | pdest, | |
| gxIMAGE * | psrc, | |||
| gxi32 | format, | |||
| gxi32 | xsize, | |||
| gxi32 | ysize, | |||
| gxi32 | sline | |||
| ) | [inline] |
Converts an image to a specific format and size.
The destination image must be initialized.
| pdest | Pointer to an initialized image where the function places the converted image. | |
| psrc | Pointer to the source image. | |
| format | Pixel format of the destination image (see GX_PIXELFORMATS). | |
| xsize | Horizontal size of the destination image in pixels. | |
| ysize | Vertical size of the destination image in pixels. | |
| sline | Length of a row in bytes (min.: xsize * size of a pixel in bytes). If zero the system computes the correct value. |
References gx_convertimage(), and gx_direct().
| gxi32 gx_zoomimage | ( | gxIMAGE * | pdest, | |
| gxi32 | xsize, | |||
| gxi32 | ysize, | |||
| gxi32 | sline, | |||
| gxIMAGE * | psrc, | |||
| gxi32 | sx1_8 = 0, |
|||
| gxi32 | sy1_8 = 0, |
|||
| gxi32 | sx2_8 = 0, |
|||
| gxi32 | sy2_8 = 0 | |||
| ) | [inline] |
Zooms an image to a specified size.
| pdest | Pointer to an initialized image where the function places the zoomed image. | |
| xsize | Horizontal size of the destination area. | |
| ysize | Vertical size of the destination area. | |
| sline | Size of a row of the destination area. | |
| psrc | Pointer to the source image. | |
| sx1_8 | Left coordinate of the zoomed area (shifted left with 8 bit = 256) | |
| sy1_8 | Top coordinate of the zoomed area (shifted left with 8 bit = 256) | |
| sx2_8 | Right coordinate of the zoomed area (shifted left with 8 bit = 256) | |
| sy2_8 | Bottom coordinate of the zoomed area (shifted left with 8 bit = 256) |
References gx_direct(), and gx_zoomimage().
Rotates an image to a specified degree.
| pdest | Pointer to an initialized image where the function places the zoomed image. | |
| psrc | Pointer to the source image. | |
| degree | Degree (Must be 0, 90, 180, 270). |
References gx_direct(), and gx_rotateimage().
Mirrors an image to a specified mode.
| pdest | Pointer to an initialized image where the function places the zoomed image. | |
| psrc | Pointer to the source image. | |
| flags | Mirror flags. It can be GX_MIRROR_HORIZONTAL or/and GX_MIRROR_VERTICAL (see GX_MIRRORFLAGS). |
References gx_direct(), and gx_mirrorimage().
| gxi32 gx_mirrorimage | ( | gxIMAGE * | pimage, | |
| gxi32 | flags | |||
| ) | [inline] |
Mirrors an image to a specified mode.
| pimage | Pointer to an image. | |
| flags | Mirror flags. It can be GX_MIRROR_HORIZONTAL or/and GX_MIRROR_VERTICAL (see GX_MIRRORFLAGS). |
References gx_mirrorimage().
| gxi32 gx_loadimage | ( | gxIMAGE * | pimage, | |
| const wchar_t * | filename, | |||
| gxi32 | pixelformat = GX_UNDEF | |||
| ) | [inline] |
Loads an image from a mass storage device and converts it to a specific pixel format (Unicode version).
On loading a RAW image, the gxIMAGE must be created with correct parameters (sline parameter also included). The format parameter of the gx_loadimage() must be -1 for RAW images.
gxIMAGE image; gx_initimage(&image); gx_createimage(&image, GX_GRAY, 1024, 768, 1024); gx_loadimage(&image, "test.raw", -1); ...
| pimage | Pointer to an initialized image structure where the function loads the data. | |
| filename | Name of the image file. | |
| pixelformat | The specific pixel format. Giving GX_GRAY converts a color image to grayscale (see GX_PIXELFORMATS). |
References gx_direct(), and gx_loadimage().
| gxi32 gx_loadimage | ( | gxIMAGE * | pimage, | |
| const char * | filename, | |||
| gxi32 | pixelformat = GX_UNDEF | |||
| ) | [inline] |
Loads an image from a mass storage device and converts it to a specific pixel format (ASCII version).
On loading a RAW image, the gxIMAGE must be created with correct parameters (sline parameter also included). The format parameter of the gx_loadimage() must be -1 for RAW images.
gxIMAGE image; gx_initimage(&image); gx_createimage(&image, GX_GRAY, 1024, 768, 1024); gx_loadimage(&image, "test.raw", -1); ...
| pimage | Pointer to an initialized image structure where the function loads the data. | |
| filename | Name of the image file. | |
| pixelformat | The specific pixel format. Giving GX_GRAY converts a color image to grayscale (see GX_PIXELFORMATS). |
References gx_direct(), and gx_loadimage().
| gxi32 gx_saveimage | ( | gxIMAGE * | pimage, | |
| const wchar_t * | filename, | |||
| gxi32 | fileformat | |||
| ) | [inline] |
Saves an image to a mass storage device in the specific file format (Unicode version).
| pimage | Pointer to the image. | |
| filename | Name of the image file. | |
| fileformat | Format of the image file (see GX_IMGFILEFORMATS). |
References gx_direct(), and gx_saveimage().
| gxi32 gx_saveimage | ( | gxIMAGE * | pimage, | |
| const char * | filename, | |||
| gxi32 | fileformat | |||
| ) | [inline] |
Saves an image to a mass storage device in the specific file format (ASCII version).
| pimage | Pointer to the image. | |
| filename | Name of the image file. | |
| fileformat | Format of the image file (see GX_IMGFILEFORMATS). |
References gx_direct(), and gx_saveimage().
| gxi32 gx_loadfrommem | ( | gxIMAGE * | pimage, | |
| const void * | buffer, | |||
| gxi32 | buflen, | |||
| gxi32 | pixelformat = GX_UNDEF | |||
| ) | [inline] |
Loads an image from the memory and converts it to a specific pixel format.
On loading a RAW image, the gxIMAGE must be created with correct parameters (sline parameter also included). The format parameter of the gx_loadfrommem() must be -1 for RAW images.
| pimage | Pointer to an initialized image structure where the function loads the data. | |
| buffer | Pointer to the image data. | |
| buflen | Length of image data in bytes. | |
| pixelformat | The specific pixel format. Giving GX_GRAY converts a color image to grayscale (see GX_PIXELFORMATS). |
References gx_direct(), and gx_loadfrommem().
| gxi32 gx_savetomem | ( | gxIMAGE * | pimage, | |
| void ** | buffer, | |||
| gxi32 * | buflen, | |||
| gxi32 | fileformat | |||
| ) | [inline] |
Saves an image in a specific file format to a specific memory area.
| pimage | Pointer to the image. | |
| buffer | Pointer to the memory area pointer that is large enough or NULL. | |
| buflen | Size of the memory area. | |
| fileformat | Format of the image file (see GX_IMGFILEFORMATS). |
References gx_direct(), and gx_savetomem().
| gxi32 gx_isvalidimage | ( | const gxIMAGE * | pimage | ) | [inline] |
Checks if image structure is valid.
| pimage | Pointer to the image. |
References gx_direct(), and gx_isvalidimage().
Copies an image to another.
| target | Pointer to the initialized destination image. | |
| source | Pointer to the source image. |
References gx_copyimage(), and gx_direct().
| gxi32 gx_loadimagefromfile | ( | gxIMAGE * | pimage, | |
| const wchar_t * | filename, | |||
| gxi32 | pixelformat = GX_UNDEF, |
|||
| gxVARIANT | properties = 0, |
|||
| gxVARIANT | comments = 0 | |||
| ) | [inline] |
Loads an image with comments from a mass storage device and converts it to a specific pixel format (Unicode version).
On loading a RAW image, the gxIMAGE must be created with correct parameters (sline parameter also included). The format parameter of the gx_loadimage() must be -1 for RAW images.
gxIMAGE image; gx_initimage(&image); gx_createimage(&image, GX_GRAY, 1024, 768, 1024); gx_loadimage(&image, "test.raw", -1); ...
| pimage | Pointer to an initialized image structure where the function loads the data. | |
| filename | Name of the image file. | |
| pixelformat | The specific pixel format. Giving GX_GRAY converts a color image to grayscale (see GX_PIXELFORMATS). | |
| properties | Properties for the image loader. It can be NULL. | |
| comments | Comments of the image. It can be NULL. |
References gx_call(), and gx_direct().
Referenced by gxImage::Load().
| gxi32 gx_loadimagefromfile | ( | gxIMAGE * | pimage, | |
| const char * | filename, | |||
| gxi32 | pixelformat = GX_UNDEF, |
|||
| gxVARIANT | properties = 0, |
|||
| gxVARIANT | comments = 0 | |||
| ) | [inline] |
Loads an image with comments from a mass storage device and converts it to a specific pixel format (ASCII version).
On loading a RAW image, the gxIMAGE must be created with correct parameters (sline parameter also included). The format parameter of the gx_loadimage() must be -1 for RAW images.
gxIMAGE image; gx_initimage(&image); gx_createimage(&image, GX_GRAY, 1024, 768, 1024); gx_loadimage(&image, "test.raw", -1); ...
| pimage | Pointer to an initialized image structure where the function loads the data. | |
| filename | Name of the image file. | |
| pixelformat | The specific pixel format. Giving GX_GRAY converts a color image to grayscale (see GX_PIXELFORMATS). | |
| properties | Properties for the image loader. It can be NULL. | |
| comments | Comments of the image. It can be NULL. |
References gx_call(), and gx_direct().
| gxi32 gx_saveimagetofile | ( | gxIMAGE * | pimage, | |
| const wchar_t * | filename, | |||
| gxi32 | fileformat, | |||
| gxVARIANT | properties = 0, |
|||
| gxVARIANT | comments = 0 | |||
| ) | [inline] |
Saves an image with comments to a mass storage device in the specific file format (Unicode version).
| pimage | Pointer to the image. | |
| filename | Name of the image file. | |
| fileformat | Format of the image file (see GX_IMGFILEFORMATS). | |
| properties | Properties for the image writer. It can be NULL. | |
| comments | Comments of the image. It can be NULL. |
References gx_call(), and gx_direct().
Referenced by gxImage::Save().
| gxi32 gx_saveimagetofile | ( | gxIMAGE * | pimage, | |
| const char * | filename, | |||
| gxi32 | fileformat, | |||
| gxVARIANT | properties = 0, |
|||
| gxVARIANT | comments = 0 | |||
| ) | [inline] |
Saves an image with comments to a mass storage device in the specific file format (ASCII version).
| pimage | Pointer to the image. | |
| filename | Name of the image file. | |
| fileformat | Format of the image file (see GX_IMGFILEFORMATS). | |
| properties | Properties for the image writer. It can be NULL. | |
| comments | Comments of the image. It can be NULL. |
References gx_call(), and gx_direct().
| gxi32 gx_saveimagetofile2 | ( | gxHANDLE | handle, | |
| gxIMAGE * | pimage, | |||
| const wchar_t * | filename, | |||
| const wchar_t * | fileformat, | |||
| gxVARIANT | properties = 0, |
|||
| gxVARIANT | comments = 0 | |||
| ) | [inline] |
Saves an image with comments to a mass storage device in the specific file format (Unicode version).
| handle | Handle of the module. | |
| pimage | Pointer to the image. | |
| filename | Name of the image file. | |
| fileformat | Format of the image file (see GX_IMGFILEFORMATS). | |
| properties | Properties for the image writer. It can be NULL. | |
| comments | Comments of the image. It can be NULL. |
References gx_call().
| gxi32 gx_loadimagefrommem | ( | gxIMAGE * | pimage, | |
| const void * | buffer, | |||
| gxi32 | buflen, | |||
| gxi32 | pixelformat = GX_UNDEF, |
|||
| gxVARIANT | properties = 0, |
|||
| gxVARIANT | comments = 0 | |||
| ) | [inline] |
Loads an image with comments from the memory and converts it to a specific pixel format.
On loading a RAW image, the gxIMAGE must be created with correct parameters (sline parameter also included). The format parameter of the gx_loadimage() must be -1 for RAW images.
| pimage | Pointer to an initialized image structure where the function loads the data. | |
| buffer | Pointer to the image data. | |
| buflen | Length of image data in bytes. | |
| pixelformat | The specific pixel format. Giving GX_GRAY converts a color image to grayscale (see GX_PIXELFORMATS). | |
| properties | Properties for the image loader. It can be NULL. | |
| comments | Comments of the image. It can be NULL. |
References gx_call(), and gx_direct().
Referenced by gxImage::LoadFromMem().
| gxi32 gx_saveimagetomem | ( | gxIMAGE * | pimage, | |
| void ** | buffer, | |||
| gxi32 * | buflen, | |||
| gxi32 | fileformat, | |||
| gxVARIANT | properties = 0, |
|||
| gxVARIANT | comments = 0 | |||
| ) | [inline] |
Saves an image with comments in a specific file format to a specific memory area.
| pimage | Pointer to the image. | |
| buffer | Pointer to the memory area pointer that is large enough or NULL. | |
| buflen | Size of the memory area. | |
| fileformat | Format of the image file (see GX_IMGFILEFORMATS). | |
| properties | Properties for the image writer. It can be NULL. | |
| comments | Comments of the image. It can be NULL. |
References gx_call(), and gx_direct().
Referenced by gxImage::SaveToMem().
| gxi32 gx_saveimagetomem2 | ( | gxHANDLE | handle, | |
| gxIMAGE * | pimage, | |||
| void ** | buffer, | |||
| gxi32 * | buflen, | |||
| wchar_t * | fileformat, | |||
| gxVARIANT | properties = 0, |
|||
| gxVARIANT | comments = 0 | |||
| ) | [inline] |
Saves an image with comments in a specific file format to a specific memory area.
| handle | Handle of the module. | |
| pimage | Pointer to the image. | |
| buffer | Pointer to the memory area pointer that is large enough or NULL. | |
| buflen | Size of the memory area. | |
| fileformat | Format of the image file. | |
| properties | Properties for the image writer. It can be NULL. | |
| comments | Comments of the image. It can be NULL. |
References gx_call().
| gxi32 gx_testimagefileformat | ( | const wchar_t * | filename, | |
| gxi32 * | fileformat | |||
| ) | [inline] |
Tests if a file is an image file.
| filename | Name of the file to test. | |
| fileformat | Buffer for the fileformat. -1 is returned for unknown file type. |
References gx_direct(), and gx_testimagefileformat().
| gxi32 gx_testimagefileformat | ( | const char * | filename, | |
| gxi32 * | fileformat | |||
| ) | [inline] |
Tests if a file is an image file.
| filename | Name of the file to test. | |
| fileformat | Buffer for the fileformat. -1 is returned for unknown file type. |
References gx_direct(), and gx_testimagefileformat().
| gxi32 gx_testimagefileformat | ( | const void * | buffer, | |
| gxi32 | buflen, | |||
| gxi32 * | fileformat | |||
| ) | [inline] |
Tests if a memory area contains an image file.
| buffer | Pointer to the memory area. | |
| buflen | Size of the memory area. | |
| fileformat | Buffer for the fileformat. -1 is returned for unknown file type. |
References gx_direct(), and gx_testimagefileformat().
| int gx_coloradjust | ( | gxHANDLE | imgexthandle, | |
| gxIMAGE * | image, | |||
| float | contrast = 0, |
|||
| float | brightness = 0, |
|||
| float | saturation = 0, |
|||
| float | gamma = 1, |
|||
| int | flags = 0 | |||
| ) | [inline] |
Makes contrast, brightness, saturation and gamma correction on the image.
The usual values for the adjusting values are between [-1, 1], the level change calculation can be expressed by the
new_level = (1+f)*old_level
The value of -1 discards all the partial information, a value of 0 does not modify the image setting.
For the gamma correction other rules are applied. The value of 1 leaves the image unchanged.
| imgexthandle | Handle to the imgext module. | |
| image | Image to process. | |
| contrast | Contrast adjust level. | |
| brightness | Brightness adjust level. | |
| saturation | Saturation adjust level. | |
| gamma | Gamma correction level. | |
| flags | Color adjusting flags, see GX_COLORADJUST_FLAGS. |
References gx_call().
Referenced by gxImgExt::Brightness(), gxImgExt::ColorAdjust(), gxImgExt::Contrast(), gxImgExt::Gamma(), and gxImgExt::Saturation().
| int gx_colormixer | ( | gxHANDLE | imgexthandle, | |
| gxIMAGE * | target, | |||
| gxIMAGE * | source, | |||
| int | r1, | |||
| int | g1, | |||
| int | b1, | |||
| int | r2 = 0, |
|||
| int | g2 = 0, |
|||
| int | b2 = 0, |
|||
| int | r3 = 0, |
|||
| int | g3 = 0, |
|||
| int | b3 = 0 | |||
| ) | [inline] |
Changes the colors of the source image based on the weight parameters.
This function is an advanced image manipulating function that can be used in adaptive processes by setting the weights.
| imgexthandle | Handle to the imgext module. | |
| target | Preallocated image to return the result. | |
| source | Image to process. | |
| r1 | Adaptable weight. | |
| g1 | Adaptable weight. | |
| b1 | Adaptable weight. | |
| r2 | Adaptable weight. | |
| g2 | Adaptable weight. | |
| b2 | Adaptable weight. | |
| r3 | Adaptable weight. | |
| g3 | Adaptable weight. | |
| b3 | Adaptable weight. |
References gx_call().
Referenced by gxImgExt::ColorMixer().
| int gx_imagedifference | ( | gxHANDLE | imgexthandle, | |
| gxIMAGE * | target, | |||
| gxIMAGE * | source1, | |||
| gxIMAGE * | source2 | |||
| ) | [inline] |
Generates a differential image from two images.
| imgexthandle | Handle to the imgext module. | |
| target | Preallocated image to return the result. | |
| source1 | First image. | |
| source2 | Second image. |
References gx_call().
Referenced by gxImgExt::Difference().
| int gx_imagetransform | ( | gxHANDLE | imgexthandle, | |
| gxIMAGE * | target, | |||
| gxIMAGE * | source, | |||
| gxPG4 | area, | |||
| void * | bgcolor = 0 | |||
| ) | [inline] |
Transforms a general area from the source image in the target image.
| imgexthandle | Handle to the imgext module. | |
| target | Preallocated image to return the result. | |
| source | Image to process. | |
| area | General area defined on the source image. | |
| bgcolor | Background color for filling parts that are not defined by the source image. |
References gx_call().
Referenced by gxImgExt::Transform().
| int gx_imageftransform | ( | gxHANDLE | imgexthandle, | |
| gxIMAGE * | target, | |||
| gxIMAGE * | source, | |||
| gxTRAFO * | trafo, | |||
| void * | bgcolor = 0 | |||
| ) | [inline] |
Fine transforms an image with the transformation described by the trafo.
| imgexthandle | Handle to the imgext module. | |
| target | Preallocated image to return the result. | |
| source | Image to process. | |
| trafo | Transformation descriptor. | |
| bgcolor | Background color for filling parts that are not defined by the source image. |
References gx_call().
Referenced by gxImgExt::FTransform().
| int gx_imagecompose | ( | gxHANDLE | imgexthandle, | |
| gxIMAGE * | target, | |||
| gxIMAGE * | upper, | |||
| gxIMAGE * | lower, | |||
| gxPNT | position, | |||
| float | alpha_u = 1, |
|||
| float | alpha_l = 1, |
|||
| int | flags = 0, |
|||
| void * | bgcolor = 0 | |||
| ) | [inline] |
Composes two images.
| imgexthandle | Handle to the imgext module. | |
| target | Preallocated image to return the result. | |
| upper | Upper image. | |
| lower | Lower image. | |
| position | Position of the upper image defined on the lower image. | |
| alpha_u | Alpha channel of the upper image. | |
| alpha_l | Alpha channel of the lower image. | |
| flags | Image composing flags, see GX_COMPOSE_FLAGS. | |
| bgcolor | Background color for filling parts that are not defined by the source images. |
References gx_call().
Referenced by gxImgExt::Compose().
| int gx_drawtext | ( | gxHANDLE | imgexthandle, | |
| gxIMAGE * | image, | |||
| const char * | text, | |||
| gxPNT | position, | |||
| const char * | fonttype, | |||
| int | fontheight, | |||
| int | fontwidth, | |||
| void * | txtcolor, | |||
| unsigned int | flags | |||
| ) | [inline] |
Draw text on an image.
If no image given, create a grayscale image.
| imgexthandle | Handle to the imgext module. | |
| image | Preallocated image to return the result. | |
| text | Text to draw. | |
| position | Position of the text on image. | |
| fonttype | Name of the fontface (WIN32) or path of the font file (LINUX). | |
| fontheight | Character height of the text in logical units. | |
| fontwidth | Average character width in logical units. | |
| txtcolor | Text color. | |
| flags | WIN32: see GX_TEXT_FLAGS. |
References gx_call().
Referenced by gxImgExt::DrawText().