Functions | |
Epeg_Image * | epeg_file_open (const char *file) |
Open a JPEG image by filename. | |
Epeg_Image * | epeg_memory_open (unsigned char *data, int size) |
Open a JPEG image stored in memory. | |
void | epeg_size_get (Epeg_Image *im, int *w, int *h) |
Return the original JPEG pixel size. | |
void | epeg_decode_size_set (Epeg_Image *im, int w, int h) |
Set the size of the image to decode in pixels. | |
void | epeg_decode_colorspace_set (Epeg_Image *im, Epeg_Colorspace colorspace) |
Set the colorspace in which to decode the image. | |
const void * | epeg_pixels_get (Epeg_Image *im, int x, int y, int w, int h) |
Get a segment of decoded pixels from an image. | |
void | epeg_pixels_free (Epeg_Image *im, const void *data) |
Free requested pixel block from an image. | |
const char * | epeg_comment_get (Epeg_Image *im) |
Get the image comment field as a string. | |
void | epeg_thumbnail_comments_get (Epeg_Image *im, Epeg_Thumbnail_Info *info) |
Get thumbnail comments of loaded image. | |
void | epeg_comment_set (Epeg_Image *im, const char *comment) |
Set the comment field of the image for saving. | |
void | epeg_quality_set (Epeg_Image *im, int quality) |
Set the encoding quality of the saved image. | |
void | epeg_thumbnail_comments_enable (Epeg_Image *im, int onoff) |
Enable thumbnail comments in saved image. | |
void | epeg_file_output_set (Epeg_Image *im, const char *file) |
Set the output file path for the image when saved. | |
void | epeg_memory_output_set (Epeg_Image *im, unsigned char **data, int *size) |
Set the output file to be a block of allocated memory. | |
void | epeg_encode (Epeg_Image *im) |
This saved the image to its specified destination. | |
void | epeg_close (Epeg_Image *im) |
Close an image handle. |
These routines are used for the Epeg library.
|
Close an image handle.
|
|
Get the image comment field as a string.
im , if there is a comment, or NULL if no comment is saved with the image. Consider the string returned to be read-only. |
|
Set the comment field of the image for saving.
comment is NULL the output file will have no comment field.The default comment will be any comment loaded from the input file. |
|
Set the colorspace in which to decode the image.
|
|
Set the size of the image to decode in pixels.
|
|
This saved the image to its specified destination.
im to its destination specified by epeg_file_output_set() or epeg_memory_output_set(). The image will be encoded at the deoded pixel size, using the quality, comment and thumbnail comment settings set on the image. |
|
Open a JPEG image by filename.
file parameter, and attempts to decode it as a jpeg file. If this failes, NULL is returned. Otherwise a valid handle to an open JPEG file is returned that can be used by other Epeg calls.
The See also: epeg_memory_open(), epeg_close() |
|
Set the output file path for the image when saved.
file must be a NUL terminated C string conatining the path to the file to be saved to. If it is NULL, the image will not be saved to a file when calling epeg_encode(). |
|
Open a JPEG image stored in memory.
data , and that is size bytes in size. If successful a valid handle is returned, or on failure NULL is returned.See also: epeg_file_open(), epeg_close() |
|
Set the output file to be a block of allocated memory.
data and the integer pointed to by size will contain the pointer to the memory block and its size in bytes, respecitvely. The memory block can be freed with the free() function call. If the save fails the pointer to the memory block will be unaffected, as will the size. |
|
Free requested pixel block from an image.
im . data must be a valid (non NULL) pointer to a pixel block taken from the image im by epeg_pixels_get() and mustbe called before the image is closed by epeg_close(). |
|
Get a segment of decoded pixels from an image.
x , y w X y . The pixel block is packed with no row padding, and it organsied from top-left to bottom right, row by row. You must free the pixel block using epeg_pixels_free() before you close the image handle, and assume the pixels to be read-only memory.On success the pointer is returned, on failure, NULL is returned. Failure may be because the rectangle is out of the bounds of the image, memory allocations failed or the image data cannot be decoded. |
|
Set the encoding quality of the saved image.
The default quality is 75. |
|
Return the original JPEG pixel size.
|
|
Enable thumbnail comments in saved image.
onoff is 1, the output file will have thumbnail comments added to it, and if it is 0, it will not. The default is 0. |
|
Get thumbnail comments of loaded image.
info struct on return. |