Tizen Native API
5.0
|
The Image Util APIs provides functions for common of images .
#include <image_util.h>
Image Util API provides support for common functions of images. The API allows :
The API consists of Image Util Transform,Image Util Encode/Decode.
Functions | |
int | image_util_calculate_buffer_size (int width, int height, image_util_colorspace_e colorspace, unsigned int *size) |
Calculates the size of the image buffer for the specified resolution and colorspace. | |
int | image_util_extract_color_from_memory (const unsigned char *image_buffer, int width, int height, unsigned char *rgb_r, unsigned char *rgb_g, unsigned char *rgb_b) |
Extracts representative color from an image buffer. |
Enumeration for colorspace.
enum image_util_error_e |
Enumeration for error.
int image_util_calculate_buffer_size | ( | int | width, |
int | height, | ||
image_util_colorspace_e | colorspace, | ||
unsigned int * | size | ||
) |
Calculates the size of the image buffer for the specified resolution and colorspace.
[in] | width | The image width |
[in] | height | The image height |
[in] | colorspace | The image colorspace |
[out] | size | The Calculated buffer size |
0
on success, otherwise a negative error valueIMAGE_UTIL_ERROR_NONE | Successful |
IMAGE_UTIL_ERROR_INVALID_PARAMETER | Invalid parameter |
int image_util_extract_color_from_memory | ( | const unsigned char * | image_buffer, |
int | width, | ||
int | height, | ||
unsigned char * | rgb_r, | ||
unsigned char * | rgb_g, | ||
unsigned char * | rgb_b | ||
) |
Extracts representative color from an image buffer.
[in] | image_buffer | The original image buffer |
[in] | width | The image width |
[in] | height | The image height |
[out] | rgb_r | The red color in RGB color space |
[out] | rgb_g | The green color in RGB color space |
[out] | rgb_b | The blue color in RGB color space |
IMAGE_UTIL_ERROR_NONE | Successful |
IMAGE_UTIL_ERROR_INVALID_PARAMETER | Invalid parameter |
IMAGE_UTIL_ERROR_OUT_OF_MEMORY | Out of memory |
IMAGE_UTIL_ERROR_INVALID_OPERATION | Invalid operation |