Tizen Native API
4.0
|
The Image Util APIs provides functions for common of images .
Required Header
#include <image_util.h>
Overview
Image Util API provides support for common functions of images. The API allows :
- Calculate the size of the image buffer for the specified resolution and colorspace to be used in the image util module.
- Extracts representative color from an image buffer.
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 Type Documentation
Enumeration for colorspace.
- Since :
- 2.3
- Enumerator:
enum image_util_error_e |
Enumeration for error.
- Since :
- 2.3
- Enumerator:
Function Documentation
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.
- Since :
- 2.3
- Parameters:
-
[in] width The image width [in] height The image height [in] colorspace The image colorspace [out] size The Calculated buffer size
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
IMAGE_UTIL_ERROR_NONE Successful IMAGE_UTIL_ERROR_INVALID_PARAMETER Invalid parameter
- See also:
- image_util_transform_run()
- image_util_decode_jpeg()
- image_util_decode_jpeg_from_memory()
- image_util_encode_jpeg()
- image_util_encode_jpeg_to_memory()
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.
- Since :
- 3.0
- Remarks:
- image_buffer should be RGB888 colorspace.
- Parameters:
-
[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
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
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