1 /* GIMP - The GNU Image Manipulation Program 2 * Copyright (C) 1995 Spencer Kimball and Peter Mattis 3 * 4 * Copyright (C) 2016, 2017 Ben Touchette 5 * 6 * This program is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 3 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program. If not, see <https://www.gnu.org/licenses/>. 18 */ 19 20 #ifndef __METADATA_TAGS_H__ 21 #define __METADATA_TAGS_H__ 22 23 #include "metadata-misc.h" 24 25 #define TAG_TYPE_XMP 1 26 #define TAG_TYPE_EXIF 2 27 #define TAG_TYPE_IPTC 3 28 29 enum 30 { 31 GIMP_XMP_NONE = 0, 32 GIMP_XMP_TEXT, 33 GIMP_XMP_BAG, 34 GIMP_XMP_SEQ, 35 GIMP_XMP_LANG, 36 GIMP_XMP_ALT 37 }; 38 39 enum 40 { 41 COL_LICENSOR_NAME = 0, 42 COL_LICENSOR_ID, 43 COL_LICENSOR_PHONE1, 44 COL_LICENSOR_PHONE_TYPE1, 45 COL_LICENSOR_PHONE2, 46 COL_LICENSOR_PHONE_TYPE2, 47 COL_LICENSOR_EMAIL, 48 COL_LICENSOR_WEB, 49 COL_LICENSOR_NUM_COLS 50 }; 51 52 enum 53 { 54 COL_CR_OWNER_NAME = 0, 55 COL_CR_OWNER_ID, 56 COL_CR_OWNER_NUM_COLS 57 }; 58 59 enum 60 { 61 COL_IMG_CR8_NAME = 0, 62 COL_IMG_CR8_ID, 63 COL_IMG_CR8_NUM_COLS 64 }; 65 66 enum 67 { 68 COL_AOO_TITLE = 0, 69 COL_AOO_DATE_CREAT, 70 COL_AOO_CREATOR, 71 COL_AOO_SOURCE, 72 COL_AOO_SRC_INV_ID, 73 COL_AOO_CR_NOT, 74 COL_AOO_NUM_COLS 75 }; 76 77 enum 78 { 79 COL_REGISTRY_ORG_ID = 0, 80 COL_REGISTRY_ITEM_ID, 81 COL_REGISTRY_NUM_COLS 82 }; 83 84 enum 85 { 86 COL_LOC_SHO_SUB_LOC = 0, 87 COL_LOC_SHO_CITY, 88 COL_LOC_SHO_STATE_PROV, 89 COL_LOC_SHO_CNTRY, 90 COL_LOC_SHO_CNTRY_ISO, 91 COL_LOC_SHO_CNTRY_WRLD_REG, 92 COL_LOC_SHO_NUM_COLS 93 }; 94 95 enum 96 { 97 COL_ORG_IMG_CODE = 0, 98 ORG_IMG_CODE_REL_NUM_COLS 99 }; 100 101 enum 102 { 103 COL_ORG_IMG_NAME = 0, 104 ORG_IMG_NAME_REL_NUM_COLS 105 }; 106 107 enum 108 { 109 COL_MOD_REL_ID = 0, 110 MOD_REL_NUM_COLS 111 }; 112 113 enum 114 { 115 COL_PROP_REL_ID = 0, 116 PROP_REL_NUM_COLS 117 }; 118 119 enum METADATA_SPECIAL_PROCESSING 120 { 121 METADATA_NONE = 0, 122 METADATA_PHONETYPE, 123 METADATA_PREPROCESS_TEXT 124 }; 125 126 extern const metadata_tag default_metadata_tags[]; 127 extern const gint n_default_metadata_tags; 128 129 extern const metadata_tag equivalent_metadata_tags[]; 130 extern const gint n_equivalent_metadata_tags; 131 132 /* Digital Source Type Combobox Items 133 * http://cv.iptc.org/newscodes/digitalsourcetype/ 134 */ 135 extern const combobox_str_tag digitalsourcetype[]; 136 extern const gint n_digitalsourcetype; 137 138 /* Model Release Status Combobox Items 139 * http://ns.useplus.org/LDF/ldf-XMPSpecification#ModelReleaseStatus 140 */ 141 extern const combobox_str_tag modelreleasestatus[]; 142 extern const gint n_modelreleasestatus; 143 144 /* Property Release Status Combobox Items 145 * http://ns.useplus.org/LDF/ldf-XMPSpecification#PropertyReleaseStatus 146 */ 147 extern const combobox_str_tag propertyreleasestatus[]; 148 extern const gint n_propertyreleasestatus; 149 150 /* Minor Model Age Disclosure Combobox Items 151 * http://ns.useplus.org/LDF/ldf-XMPSpecification#MinorModelAgeDisclosure 152 */ 153 extern const combobox_str_tag minormodelagedisclosure[]; 154 extern const gint n_minormodelagedisclosure; 155 156 /* Urgency */ 157 extern const gchar *urgency[]; 158 extern const gint n_urgency; 159 160 /* Marked */ 161 extern const combobox_int_tag marked[]; 162 extern const gint n_marked; 163 164 /* Phone Types */ 165 extern const combobox_str_tag phone_types[]; 166 extern const gint n_phone_types; 167 168 /* DICOM Patient Sex 169 * http://dicomlookup.com/lookup.asp?sw=Ttable&q=C.7-1 170 * http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/XMP.html#DICOM 171 * https://dicomiseasy.blogspot.ca/2011/11/introduction-to-dicom-chapter-iii-dicom.html 172 * http://dicom.nema.org/standard.html 173 */ 174 extern const combobox_str_tag dicom[]; 175 extern const gint n_dicom; 176 177 /* GPS Altitude Ref */ 178 extern const gchar *gpsaltref[]; 179 extern const gint n_gpsaltref; 180 181 /* GPS Latitude Ref */ 182 extern const gchar *gpslatref[]; 183 extern const gint n_gpslatref; 184 185 /* GPS Longitude Ref */ 186 extern const gchar *gpslngref[]; 187 extern const gint n_gpslngref; 188 189 /* GPS Measurement System */ 190 extern const gchar *gpsaltsys[]; 191 extern const gint n_gpsaltsys; 192 193 extern const TranslateHeaderTag creatorContactInfoHeader; 194 195 extern const TranslateTag creatorContactInfoTags[]; 196 197 extern const TranslateHeaderTag locationCreationInfoHeader; 198 199 extern const TranslateTag locationCreationInfoTags[]; 200 201 extern const TranslateHeaderTag imageSupplierInfoHeader; 202 203 extern const TranslateTag imageSupplierInfoTags[]; 204 205 /* Plus and IPTC extension tags */ 206 207 #define LICENSOR_HEADER "Xmp.plus.Licensor" 208 extern const gchar *licensor[]; 209 extern const gint n_licensor; 210 extern const gint licensor_special_handling[]; 211 212 #ifdef USE_TAGS 213 #define IMAGESUPPLIER_HEADER "Xmp.plus.ImageSupplier" 214 extern const gchar *imagesupplier[]; 215 extern const gint n_imagesupplier; 216 #endif 217 218 #define IMAGECREATOR_HEADER "Xmp.plus.ImageCreator" 219 extern const gchar *imagecreator[]; 220 extern const gint n_imagecreator; 221 222 #define COPYRIGHTOWNER_HEADER "Xmp.plus.CopyrightOwner" 223 extern const gchar *copyrightowner[]; 224 extern const gint n_copyrightowner; 225 226 #define REGISTRYID_HEADER "Xmp.iptcExt.RegistryId" 227 extern const gchar *registryid[]; 228 extern const gchar *registryid_alternative[]; 229 extern const gint n_registryid; 230 231 #define ARTWORKOROBJECT_HEADER "Xmp.iptcExt.ArtworkOrObject" 232 extern const gchar *artworkorobject[]; 233 extern const gchar *artworkorobject_alternative[]; 234 extern const gint n_artworkorobject; 235 236 #define LOCATIONSHOWN_HEADER "Xmp.iptcExt.LocationShown" 237 extern const gchar *locationshown[]; 238 extern const gchar *locationshown_alternative[]; 239 extern const gint n_locationshown; 240 241 #ifdef USE_TAGS 242 #define LOCATIONCREATED_HEADER "Xmp.iptcExt.LocationCreated" 243 extern const gchar *locationcreated[]; 244 extern const gint n_locationcreated; 245 #endif 246 247 248 gchar * metadata_format_gps_longitude_latitude (const gdouble value); 249 gchar * metadata_format_gps_altitude (const gdouble value, 250 gboolean use_meter, 251 gchar *measurement_symbol); 252 253 #endif /* __METADATA_TAGS_H__ */ 254