4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Jeongmo Yang <jm80.yang@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
22 #ifndef _MM_EXIFINFO_H_
23 #define _MM_EXIFINFO_H_
25 /*=======================================================================================
27 ========================================================================================*/
28 #include <libexif/exif-ifd.h>
29 #include <libexif/exif-tag.h>
30 #include <libexif/exif-format.h>
31 #include <libexif/exif-data.h>
37 /*=======================================================================================
38 | STRUCTURE DEFINITIONS |
39 ========================================================================================*/
41 * Structure for exif data infomation.
44 void *data; /**< saved exif data*/
45 unsigned int size; /**< size of saved exif data*/
48 /*=======================================================================================
49 | GLOBAL FUNCTION PROTOTYPES |
50 ========================================================================================*/
53 * @param[in] info exif info.
56 int mm_exif_create_exif_info(mm_exif_info_t **info);
60 * @param[in] info exif info.
63 void mm_exif_destory_exif_info(mm_exif_info_t *info);
66 * get exif data information from data buffer
67 * @param[in] info exif info.
68 * @return return ExifData.
70 ExifData *mm_exif_get_exif_data_from_data(mm_exif_info_t *info);
73 * get exif data information from exif info
74 * @param[in] info exif info.
75 * @param[out] Exif tag .
78 ExifData *mm_exif_get_exif_from_info(mm_exif_info_t *info);
81 * Write exif data information into exif info
82 * @param[in] info exif info.
83 * @param[in] Exif tag .
84 * @param[in] Exif tag value to be written.
87 int mm_exif_set_exif_to_info(mm_exif_info_t *info, ExifData *exif);
90 * add one tag information into exif
91 * @param[in] info exif info.
92 * @param[in] Exif tag .
93 * @param[in] tag content category.
94 * @param[in] tag format.
95 * @param[in] the number of the component .
96 * @param[in] the pointer of the tag data.
99 int mm_exif_set_add_entry(ExifData *exif, ExifIfd ifd, ExifTag tag,
100 ExifFormat format, unsigned long components,
104 * Write thumbnail data into exif info.
105 * @param[in] info exif info.
106 * @param[in] thumbnail image thumbnail data.
107 * @param[in] width width of thumbnail image.
108 * @param[in] height height of thumbnail image.
109 * @param[in] length length of thumbnail image.
110 * @return return int.
112 int mm_exif_add_thumbnail_info(mm_exif_info_t *info, void *thumbnail,
113 int width, int height, int len);
116 * Write exif info into a jpeg memory buffer.
117 * @param[in/out] mem image data buffer.
118 * @param[in/out] length image data length.
119 * @param[in] info exif info.
120 * @param[in] jpeg jpeg image data.
121 * @param[in] length length of jpeg image.
122 * @return return int.
124 int mm_exif_write_exif_jpeg_to_memory(void **mem, unsigned int *length,
125 mm_exif_info_t *info, void *jpeg,
126 unsigned int jpeg_len);
129 * Load exif info from a jpeg memory buffer.
130 * @param[out] info exif info.
131 * @param[in] jpeg jpeg image data.
132 * @param[in] length length of jpeg image.
133 * @return return int.
135 int mm_exif_load_exif_info(mm_exif_info_t **info, void *jpeg_data, int jpeg_length);
140 #endif /*_MM_EXIFINFO_H_*/