The Image Metadata API provides functions that allow to get information about stored image files.
This file contains the image metadata API and related functions to proceed with them. Functions include cloning and destroying the image metadata, getting image metadata such as width, height,
orientation, date taken.
Required Header
#include <media_content.h>
Overview
The Image Metadata API provides functions to get basic information associated with image files:
For getting the image handle (image_meta_h) from the media information (media_info_h), call media_info_get_image() function.
For getting the information related to image files stored in the device call the respective get functions e.g. to get the width of a image, call image_meta_get_width() function and to get orientation (media_content_orientation_e) of a image, call image_meta_get_orientation() function and so on.
When the image handle is no longer needed, it should be destroyed by calling image_meta_destroy() function.
Functions |
int | image_meta_clone (image_meta_h *dst, image_meta_h src) |
| Clones the image metadata.
|
int | image_meta_destroy (image_meta_h image) |
| Destroys the image metadata.
|
int | image_meta_get_media_id (image_meta_h image, char **media_id) |
| Gets the ID of an image.
|
int | image_meta_get_width (image_meta_h image, int *width) |
| Gets the image width in pixels.
|
int | image_meta_get_height (image_meta_h image, int *height) |
| Gets the image height in pixels.
|
int | image_meta_get_orientation (image_meta_h image, media_content_orientation_e *orientation) |
| Gets the image orientation.
|
int | image_meta_get_date_taken (image_meta_h image, char **date_taken) |
| Gets the image creation time.
|
int | image_meta_get_exposure_time (image_meta_h image, char **exposure_time) |
| Gets the exposure time from EXIF.
|
int | image_meta_get_fnumber (image_meta_h image, double *fnumber) |
| Gets the fnumber from EXIF.
|
int | image_meta_get_iso (image_meta_h image, int *iso) |
| Gets the iso from EXIF.
|
int | image_meta_get_model (image_meta_h image, char **model) |
| Gets the model from EXIF.
|
Typedefs |
typedef struct image_meta_s * | image_meta_h |
| The structure type for the Image metadata handle.
|
Typedef Documentation
The structure type for the Image metadata handle.
- Since :
- 2.3
Function Documentation
Clones the image metadata.
The function copies the image metadata handle from a source to destination.
- Since :
- 2.3
- Parameters:
-
[out] | dst | The destination handle to the image metadata |
[in] | src | The source handle to the image metadata |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
- See also:
- image_meta_destroy()
Destroys the image metadata.
The function frees all resources related to the image metadata handle. This handle no longer can be used to perform any operations. A new handle has to be created before next usage.
- Since :
- 2.3
- Parameters:
-
[in] | image | The handle to the image metadata |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
- Precondition:
- Get a copy of image_meta handle by calling image_meta_clone().
- See also:
- image_meta_clone()
Gets the image creation time.
- Since :
- 2.3
- Parameters:
-
[in] | image | The handle to the image metadata |
[out] | date_taken | The time, when image was taken (in seconds, since the Epoch) |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
Gets the exposure time from EXIF.
- Since :
- 2.4
- Parameters:
-
[in] | image | The handle to the image metadata |
[out] | exposure_time | The value of exposure_time, getting from EXIF |
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
Gets the fnumber from EXIF.
- Since :
- 2.4
- Parameters:
-
[in] | image | The handle to the image metadata |
[out] | fnumber | The value of fnumber, getting from EXIF |
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
Gets the image height in pixels.
- Since :
- 2.3
- Parameters:
-
[in] | image | The handle to the image metadata |
[out] | height | The image height in pixels |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
Gets the iso from EXIF.
- Since :
- 2.4
- Parameters:
-
[in] | image | The handle to the image metadata |
[out] | iso | The value of iso, getting from EXIF |
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
Gets the ID of an image.
- Since :
- 2.3
- Parameters:
-
[in] | image | The handle to the image metadata |
[out] | media_id | The media ID |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
Gets the model from EXIF.
- Since :
- 2.4
- Parameters:
-
[in] | image | The handle to the image metadata |
[out] | model | The value of model, getting from EXIF |
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
Gets the image orientation.
- Since :
- 2.3
- Parameters:
-
[in] | image | The handle to the image metadata |
[out] | orientation | The image orientation |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
Gets the image width in pixels.
- Since :
- 2.3
- Parameters:
-
[in] | image | The handle to the image metadata |
[out] | width | The image width in pixels |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-