Tizen Native API
7.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) TIZEN_DEPRECATED_API |
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. | |
Typedefs | |
typedef void * | image_util_image_h |
Image handle. |
Typedef Documentation
typedef void* image_util_image_h |
Image handle.
- Since :
- 5.5
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.
- Deprecated:
- Deprecated since 5.5.
- 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()
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_INVALID_OPERATION Invalid operation IMAGE_UTIL_ERROR_OUT_OF_MEMORY Out of memory