M4EXIFC_CommonAPI.h revision 7c9d8018755adf1857571125ba1b3598c96ea506
1/* 2 * Copyright (C) 2004-2011 NXP Software 3 * Copyright (C) 2011 The Android Open Source Project 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17/** 18 ****************************************************************************** 19 * @file M4EXIFC_CommonAPI.h 20 * @brief EXIF common data header 21 * @note The types, structures and macros defined in this file allow reading 22 * and writing EXIF JPEG images compliant spec EXIF 2.2 23 ****************************************************************************** 24*/ 25 26 27#ifndef __M4_EXIF_COMMON_API_H__ 28#define __M4_EXIF_COMMON_API_H__ 29 30#include "M4TOOL_VersionInfo.h" 31#include "M4Common_types.h" 32#include "M4OSA_Debug.h" 33#include "M4OSA_Error.h" 34#include "M4OSA_Types.h" 35#include "M4OSA_Memory.h" 36#include "M4OSA_CoreID.h" 37 38#ifdef __cplusplus 39extern "C" { 40#endif 41 42/** 43 ************************************************************************ 44 * type M4EXIFC_Context 45 ************************************************************************ 46*/ 47typedef M4OSA_Void* M4EXIFC_Context; 48 49/** 50 ****************************************************************************** 51 * Errors & Warnings 52 ****************************************************************************** 53*/ 54 55#define M4EXIFC_NO_ERR 0x00000000 /**< invalid parameter */ 56#define M4EXIFC_ERR_PARAMETER 0x00000001 /**< invalid parameter */ 57#define M4EXIFC_ERR_ALLOC 0x00000002 /**< allocation error */ 58#define M4EXIFC_ERR_BAD_CONTEXT 0x00000003 /**< invalid context */ 59#define M4EXIFC_ERR_NOT_COMPLIANT 0x00000004 /**< the image in buffer is not 60 JPEG compliant */ 61#define M4EXIFC_ERR_NO_APP_FOUND 0x00000005 /**< the JPEG image does not contain any APP1 62 Exif 2.2 compliant */ 63#define M4EXIFC_WAR_NO_THUMBNAIL 0x00000006 /**< the Exif part does not contain any 64 thumbnail */ 65#define M4EXIFC_ERR_APP_TRUNCATED 0x00000007 /**< The APP1 section in input buffer is 66 not complete */ 67 68 69/** 70 ****************************************************************************** 71 * structure M4EXIFC_BasicTags 72 * @brief This structure stores the basic tags values. 73 * @note This Exif reader focuses on a set of "Entry Tags". 74 * This structure contains the corresponding "Entry Values" of these tags. 75 * M4EXIFC_Char* fields of structure are Null terminated Strings. 76 ****************************************************************************** 77*/ 78typedef struct 79{ 80 M4OSA_Int32 width; /**< image width in pixels */ 81 M4OSA_Int32 height; /**< image height in pixels */ 82 M4OSA_Char *creationDateTime; /**< date and time original image was generated */ 83 M4OSA_Char *lastChangeDateTime; /**< file change date and time */ 84 M4OSA_Char *description; /**< image title */ 85 M4OSA_Char *make; /**< manufacturer of image input equipment */ 86 M4OSA_Char *model; /**< model of image input equipment */ 87 M4OSA_Char *software; /**< software used */ 88 M4OSA_Char *artist; /**< person who created the image */ 89 M4OSA_Char *copyright; /**< copyright holder */ 90 M4COMMON_Orientation orientation; /**< orientation of image */ 91 M4OSA_Int32 thumbnailSize; /**< size of the thumbnail */ 92 M4OSA_UInt8 *thumbnailImg; /**< pointer to the thumbnail in main image buffer*/ 93 M4OSA_Char *latitudeRef; /**< latitude reference */ 94 M4COMMON_Location latitude; /**< latitude */ 95 M4OSA_Char *longitudeRef; /**< longitude reference */ 96 M4COMMON_Location longitude; /**< longitude */ 97 98} M4EXIFC_BasicTags; 99 100 101/** 102 ****************************************************************************** 103 * M4OSA_ERR M4EXIFC_getVersion (M4_VersionInfo *pVersion) 104 * @brief get the version numbers of the exif library. 105 * @note This function retrieves the version numbers in a structure. 106 * @param pVersion: (OUT) the structure containing version numbers 107 * @return M4NO_ERROR: there is no error 108 * @return M4EXIFC_ERR_PARAMETER: (Debug only) the parameter is M4EXIFC_NULL. 109 ****************************************************************************** 110*/ 111M4OSA_ERR M4EXIFC_getVersion (M4_VersionInfo *pVersion); 112 113 114 115#ifdef __cplusplus 116} 117#endif /* __cplusplus*/ 118#endif /* __M4_EXIF_COMMON_API_H__ */ 119 120