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, title, burst shot id and updating image to DB.
Required Header
#include <media_content.h>
Overview
The Image Metadata API provides functions to get basic information associated with image files:
- width
- height
- date taken (when image was created)
- image orientation
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.
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 operation. A new handle has to be created before next usage.
- Since :
- 2.3
- Parameters:
-
[in] | image | The image metadata handle |
- 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 burst shot ID.
- Since :
- 2.3
- Parameters:
-
[in] | image | The image metadata handle |
[out] | burst_id | The ID of burst shot\ n If burst_id is NULL , this is not burst shot. |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
Gets the image creation time.
- Since :
- 2.3
- Parameters:
-
[in] | image | The image metadata handle |
[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 image height in pixels.
- Since :
- 2.3
- Parameters:
-
[in] | image | The image metadata handle |
[out] | height | The image height in pixels |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
Gets the ID of an image.
- Since :
- 2.3
- Parameters:
-
[in] | image | The image metadata handle |
[out] | media_id | The ID of an image |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
Gets the image orientation.
- Since :
- 2.3
- Parameters:
-
[in] | image | The image metadata handle |
[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 image metadata handle |
[out] | width | The image width in pixels |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
Checks whether the media is a burst shot image.
- Since :
- 2.3
- Parameters:
-
[in] | image | The image metadata handle |
[out] | is_burst_shot | true if the media is a burst shot image, otherwise false if the media is not a burst shot image |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
Sets an orientation of the image.
- Since :
- 2.3
- Parameters:
-
[in] | image | The image metadata handle |
[in] | orientation | The image orientation |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
- Postcondition:
- image_meta_update_to_db()
Updates the image to the media database.
The function updates the given image meta in the media database. The function should be called after any change in image attributes, to be updated to the media database. For example, after using image_meta_set_orientation() for setting the orientation of the image, the image_meta_update_to_db() function should be called so as to update the given image attributes in the media database.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/content.write
- Parameters:
-
[in] | image | The handle to the image |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
- Precondition:
- This function requires opened connection to content service by media_content_connect().
- See also:
- media_content_connect()
-
image_meta_set_orientation()