Home | History | Annotate | Download | only in img_utils
      1 /*
      2  * Copyright 2014 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 #ifndef IMG_UTILS_TIFF_TAG_DEFINITION_H
     18 #define IMG_UTILS_TIFF_TAG_DEFINITION_H
     19 
     20 #include <img_utils/TiffEntry.h>
     21 #include <img_utils/Output.h>
     22 #include <img_utils/TiffHelpers.h>
     23 #include <stdint.h>
     24 
     25 namespace android {
     26 namespace img_utils {
     27 
     28 /**
     29  * Tag definitions contain information about standard TIFF compatible tags.
     30  */
     31 typedef struct TagDefinition {
     32     // The tag name.
     33     const char* tagName;
     34     // The specified tag ID.
     35     const uint16_t tagId;
     36     // The default type for this tag.  This must be a valid TIFF type.
     37     const TagType defaultType;
     38     // The default Image File Directory (IFD) for this tag.
     39     const uint32_t defaultIfd;
     40     // The valid count for this tag, or 0 if the count is not fixed.
     41     const uint32_t fixedCount;
     42     // The endianness of the tag value, or UNDEFINED_ENDIAN if there is no fixed endian
     43     const Endianness fixedEndian;
     44 } TagDefinition_t;
     45 
     46 /**
     47  * Convenience defines for tag ids.
     48  */
     49 enum {
     50     TAG_RAWTOPREVIEWGAIN = 0xC7A8u,
     51     TAG_NEWRAWIMAGEDIGEST = 0xC7A7u,
     52     TAG_ORIGINALDEFAULTCROPSIZE = 0xC793u,
     53     TAG_ORIGINALBESTQUALITYFINALSIZE = 0xC792u,
     54     TAG_ORIGINALDEFAULTFINALSIZE = 0xC791u,
     55     TAG_PROFILEHUESATMAPENCODING = 0xC7A3u,
     56     TAG_PROFILELOOKTABLEENCODING = 0xC7A4u,
     57     TAG_BASELINEEXPOSUREOFFSET = 0xC7A5u,
     58     TAG_DEFAULTBLACKRENDER = 0xC7A6u,
     59     TAG_DEFAULTUSERCROP = 0xC7B5u,
     60     TAG_NOISEPROFILE = 0xC761u,
     61     TAG_OPCODELIST3 = 0xC74Eu,
     62     TAG_OPCODELIST2 = 0xC741u,
     63     TAG_OPCODELIST1 = 0xC740u,
     64     TAG_PROFILELOOKTABLEDATA = 0xC726u,
     65     TAG_PROFILELOOKTABLEDIMS = 0xC725u,
     66     TAG_ROWINTERLEAVEFACTOR = 0xC71Fu,
     67     TAG_SUBTILEBLOCKSIZE = 0xC71Eu,
     68     TAG_ORIGINALRAWFILEDIGEST = 0xC71Du,
     69     TAG_RAWIMAGEDIGEST = 0xC71Cu,
     70     TAG_PREVIEWDATETIME = 0xC71Bu,
     71     TAG_PREVIEWCOLORSPACE = 0xC71Au,
     72     TAG_PREVIEWSETTINGSDIGEST = 0xC719u,
     73     TAG_PREVIEWSETTINGSNAME = 0xC718u,
     74     TAG_PREVIEWAPPLICATIONVERSION = 0xC717u,
     75     TAG_PREVIEWAPPLICATIONNAME = 0xC716u,
     76     TAG_FORWARDMATRIX2 = 0xC715u,
     77     TAG_FORWARDMATRIX1 = 0xC714u,
     78     TAG_PROFILECOPYRIGHT = 0xC6FEu,
     79     TAG_PROFILEEMBEDPOLICY = 0xC6FDu,
     80     TAG_PROFILETONECURVE = 0xC6FCu,
     81     TAG_PROFILEHUESATMAPDATA2 = 0xC6FBu,
     82     TAG_PROFILEHUESATMAPDATA1 = 0xC6FAu,
     83     TAG_PROFILEHUESATMAPDIMS = 0xC6F9u,
     84     TAG_PROFILENAME = 0xC6F8u,
     85     TAG_NOISEREDUCTIONAPPLIED = 0xC6F7u,
     86     TAG_ASSHOTPROFILENAME = 0xC6F6u,
     87     TAG_EXTRACAMERAPROFILES = 0xC6F5u,
     88     TAG_PROFILECALIBRATIONSIGNATURE = 0xC6F4u,
     89     TAG_CAMERACALIBRATIONSIGNATURE = 0xC6F3u,
     90     TAG_COLORIMETRICREFERENCE = 0xC6BFu,
     91     TAG_CURRENTPREPROFILEMATRIX = 0xC692u,
     92     TAG_CURRENTICCPROFILE = 0xC691u,
     93     TAG_ASSHOTPREPROFILEMATRIX = 0xC690u,
     94     TAG_ASSHOTICCPROFILE = 0xC68Fu,
     95     TAG_MASKEDAREAS = 0xC68Eu,
     96     TAG_ACTIVEAREA = 0xC68Du,
     97     TAG_ORIGINALRAWFILEDATA = 0xC68Cu,
     98     TAG_ORIGINALRAWFILENAME = 0xC68Bu,
     99     TAG_RAWDATAUNIQUEID = 0xC65Du,
    100     TAG_MAKERNOTESAFETY = 0xC635u,
    101     TAG_DNGPRIVATEDATA = 0xC634u,
    102     TAG_SHADOWSCALE = 0xC633u,
    103     TAG_ANTIALIASSTRENGTH = 0xC632u,
    104     TAG_CHROMABLURRADIUS = 0xC631u,
    105     TAG_LENSINFO = 0xC630u,
    106     TAG_CAMERASERIALNUMBER = 0xC62Fu,
    107     TAG_LINEARRESPONSELIMIT = 0xC62Eu,
    108     TAG_BAYERGREENSPLIT = 0xC62Du,
    109     TAG_BASELINESHARPNESS = 0xC62Cu,
    110     TAG_BASELINENOISE = 0xC62Bu,
    111     TAG_BASELINEEXPOSURE = 0xC62Au,
    112     TAG_ASSHOTWHITEXY = 0xC629u,
    113     TAG_ASSHOTNEUTRAL = 0xC628u,
    114     TAG_ANALOGBALANCE = 0xC627u,
    115     TAG_REDUCTIONMATRIX2 = 0xC626u,
    116     TAG_REDUCTIONMATRIX1 = 0xC625u,
    117     TAG_CAMERACALIBRATION2 = 0xC624u,
    118     TAG_CAMERACALIBRATION1 = 0xC623u,
    119     TAG_COLORMATRIX2 = 0xC622u,
    120     TAG_COLORMATRIX1 = 0xC621u,
    121     TAG_CALIBRATIONILLUMINANT2 = 0xC65Bu,
    122     TAG_CALIBRATIONILLUMINANT1 = 0xC65Au,
    123     TAG_DEFAULTCROPSIZE = 0xC620u,
    124     TAG_DEFAULTCROPORIGIN = 0xC61Fu,
    125     TAG_BESTQUALITYSCALE = 0xC65Cu,
    126     TAG_DEFAULTSCALE = 0xC61Eu,
    127     TAG_WHITELEVEL = 0xC61Du,
    128     TAG_BLACKLEVELDELTAV = 0xC61Cu,
    129     TAG_BLACKLEVELDELTAH = 0xC61Bu,
    130     TAG_BLACKLEVEL = 0xC61Au,
    131     TAG_BLACKLEVELREPEATDIM = 0xC619u,
    132     TAG_LINEARIZATIONTABLE = 0xC618u,
    133     TAG_CFALAYOUT = 0xC617u,
    134     TAG_CFAPLANECOLOR = 0xC616u,
    135     TAG_LOCALIZEDCAMERAMODEL = 0xC615u,
    136     TAG_UNIQUECAMERAMODEL = 0xC614u,
    137     TAG_DNGBACKWARDVERSION = 0xC613u,
    138     TAG_DNGVERSION = 0xC612u,
    139     TAG_SUBFILETYPE = 0x00FFu,
    140     TAG_YRESOLUTION = 0x011Bu,
    141     TAG_XRESOLUTION = 0x011Au,
    142     TAG_THRESHHOLDING = 0x0107u,
    143     TAG_STRIPOFFSETS = 0x0111u,
    144     TAG_STRIPBYTECOUNTS = 0x0117u,
    145     TAG_SOFTWARE = 0x0131u,
    146     TAG_SAMPLESPERPIXEL = 0x0115u,
    147     TAG_ROWSPERSTRIP = 0x0116u,
    148     TAG_RESOLUTIONUNIT = 0x0128u,
    149     TAG_PLANARCONFIGURATION = 0x011Cu,
    150     TAG_PHOTOMETRICINTERPRETATION = 0x0106u,
    151     TAG_ORIENTATION = 0x0112u,
    152     TAG_NEWSUBFILETYPE = 0x00FEu,
    153     TAG_MODEL = 0x0110u,
    154     TAG_MINSAMPLEVALUE = 0x0118u,
    155     TAG_MAXSAMPLEVALUE = 0x0119u,
    156     TAG_MAKE = 0x010Fu,
    157     TAG_IMAGEWIDTH = 0x0100u,
    158     TAG_IMAGELENGTH = 0x0101u,
    159     TAG_IMAGEDESCRIPTION = 0x010Eu,
    160     TAG_HOSTCOMPUTER = 0x013Cu,
    161     TAG_GRAYRESPONSEUNIT = 0x0122u,
    162     TAG_GRAYRESPONSECURVE = 0x0123u,
    163     TAG_FREEOFFSETS = 0x0120u,
    164     TAG_FREEBYTECOUNTS = 0x0121u,
    165     TAG_FILLORDER = 0x010Au,
    166     TAG_EXTRASAMPLES = 0x0152u,
    167     TAG_DATETIME = 0x0132u,
    168     TAG_COPYRIGHT = 0x8298u,
    169     TAG_COMPRESSION = 0x0103u,
    170     TAG_COLORMAP = 0x0140u,
    171     TAG_CELLWIDTH = 0x0108u,
    172     TAG_CELLLENGTH = 0x0109u,
    173     TAG_BITSPERSAMPLE = 0x0102u,
    174     TAG_ARTIST = 0x013Bu,
    175     TAG_EXIFVERSION = 0x9000u,
    176     TAG_CFAREPEATPATTERNDIM = 0x828Du,
    177     TAG_DATETIMEORIGINAL = 0x9003u,
    178     TAG_CFAPATTERN = 0x828Eu,
    179     TAG_SUBIFDS = 0x014Au,
    180     TAG_TIFFEPSTANDARDID = 0x9216u,
    181     TAG_EXPOSURETIME = 0x829Au,
    182     TAG_ISOSPEEDRATINGS = 0x8827u,
    183     TAG_FOCALLENGTH = 0x920Au,
    184     TAG_FNUMBER = 0x829Du,
    185     TAG_GPSINFO = 0x8825u,
    186     TAG_GPSVERSIONID = 0x0u,
    187     TAG_GPSLATITUDEREF = 0x1u,
    188     TAG_GPSLATITUDE = 0x2u,
    189     TAG_GPSLONGITUDEREF = 0x3u,
    190     TAG_GPSLONGITUDE = 0x4u,
    191     TAG_GPSTIMESTAMP = 0x7u,
    192     TAG_GPSDATESTAMP = 0x001Du,
    193 };
    194 
    195 /**
    196  * Convenience values for tags with enumerated values
    197  */
    198 
    199 enum {
    200     TAG_ORIENTATION_NORMAL = 1,
    201     TAG_ORIENTATION_ROTATE_180 = 3,
    202     TAG_ORIENTATION_ROTATE_90 = 6,
    203     TAG_ORIENTATION_ROTATE_270 = 8,
    204     TAG_ORIENTATION_UNKNOWN = 9
    205 };
    206 
    207 /**
    208  * TIFF_EP_TAG_DEFINITIONS contains tags defined in the TIFF EP spec
    209  */
    210 const TagDefinition_t TIFF_EP_TAG_DEFINITIONS[] =  {
    211     { // PhotometricInterpretation
    212         "PhotometricInterpretation",
    213         0x0106u,
    214         SHORT,
    215         IFD_0,
    216         1,
    217         UNDEFINED_ENDIAN
    218     },
    219     { // SubIfds
    220         "SubIfds",
    221         0x014Au,
    222         LONG,
    223         IFD_0,
    224         0,
    225         UNDEFINED_ENDIAN
    226     },
    227     { // CFAPattern
    228         "CFAPattern",
    229         0x828Eu,
    230         BYTE,
    231         IFD_0,
    232         0,
    233         UNDEFINED_ENDIAN
    234     },
    235     { // CFARepeatPatternDim
    236         "CFARepeatPatternDim",
    237         0x828Du,
    238         SHORT,
    239         IFD_0,
    240         2,
    241         UNDEFINED_ENDIAN
    242     },
    243     { // DateTimeOriginal
    244         "DateTimeOriginal",
    245         0x9003u,
    246         ASCII,
    247         IFD_0,
    248         20,
    249         UNDEFINED_ENDIAN
    250     },
    251     { // Tiff/EPStandardID
    252         "Tiff",
    253         0x9216u,
    254         BYTE,
    255         IFD_0,
    256         4,
    257         UNDEFINED_ENDIAN
    258     },
    259     { // ExposureTime
    260         "ExposureTime",
    261         0x829Au,
    262         RATIONAL,
    263         IFD_0,
    264         0,
    265         UNDEFINED_ENDIAN
    266     },
    267     { // ISOSpeedRatings
    268         "ISOSpeedRatings",
    269         0x8827u,
    270         SHORT,
    271         IFD_0,
    272         0,
    273         UNDEFINED_ENDIAN
    274     },
    275     { // FocalLength
    276         "FocalLength",
    277         0x920Au,
    278         RATIONAL,
    279         IFD_0,
    280         0,
    281         UNDEFINED_ENDIAN
    282     },
    283     { // FNumber
    284         "FNumber",
    285         0x829Du,
    286         RATIONAL,
    287         IFD_0,
    288         0,
    289         UNDEFINED_ENDIAN
    290     },
    291     { // GPSInfo
    292         "GPSInfo",
    293         0x8825u,
    294         LONG,
    295         IFD_0,
    296         1,
    297         UNDEFINED_ENDIAN
    298     },
    299     { // GPSVersionID
    300         "GPSVersionID",
    301         0x0u,
    302         BYTE,
    303         IFD_0,
    304         4,
    305         UNDEFINED_ENDIAN
    306     },
    307     { // GPSLatitudeRef
    308         "GPSLatitudeRef",
    309         0x1u,
    310         ASCII,
    311         IFD_0,
    312         2,
    313         UNDEFINED_ENDIAN
    314     },
    315     { // GPSLatitude
    316         "GPSLatitude",
    317         0x2u,
    318         RATIONAL,
    319         IFD_0,
    320         3,
    321         UNDEFINED_ENDIAN
    322     },
    323     { // GPSLongitudeRef
    324         "GPSLongitudeRef",
    325         0x3u,
    326         ASCII,
    327         IFD_0,
    328         2,
    329         UNDEFINED_ENDIAN
    330     },
    331     { // GPSLongitude
    332         "GPSLongitude",
    333         0x4u,
    334         RATIONAL,
    335         IFD_0,
    336         3,
    337         UNDEFINED_ENDIAN
    338     },
    339     { // GPSTimeStamp
    340         "GPSTimeStamp",
    341         0x7u,
    342         RATIONAL,
    343         IFD_0,
    344         3,
    345         UNDEFINED_ENDIAN
    346     },
    347     /*TODO: Remaining TIFF EP tags*/
    348 };
    349 
    350 /**
    351  * EXIF_2_3_TAG_DEFINITIONS contains tags defined in the Jeita EXIF 2.3 spec
    352  */
    353 const TagDefinition_t EXIF_2_3_TAG_DEFINITIONS[] = {
    354     { // ExifVersion
    355         "ExifVersion",
    356         0x9000u,
    357         UNDEFINED,
    358         IFD_0,
    359         4,
    360         UNDEFINED_ENDIAN
    361     },
    362     { // GPSDateStamp
    363         "GPSDateStamp",
    364         0x001Du,
    365         ASCII,
    366         IFD_0,
    367         11,
    368         UNDEFINED_ENDIAN
    369     },
    370     /*TODO: Remaining EXIF 2.3 tags*/
    371 };
    372 
    373 /**
    374  * TIFF_6_TAG_DEFINITIONS contains tags defined in the TIFF 6.0 spec
    375  */
    376 const TagDefinition_t TIFF_6_TAG_DEFINITIONS[] = {
    377     { // SubFileType
    378         "SubFileType",
    379         0x00FFu,
    380         SHORT,
    381         IFD_0,
    382         1,
    383         UNDEFINED_ENDIAN
    384     },
    385     { // Artist
    386         "Artist",
    387         0x013Bu,
    388         ASCII,
    389         IFD_0,
    390         0,
    391         UNDEFINED_ENDIAN
    392     },
    393     { // BitsPerSample
    394         "BitsPerSample",
    395         0x0102u,
    396         SHORT,
    397         IFD_0,
    398         0,
    399         UNDEFINED_ENDIAN
    400     },
    401     { // CellLength
    402         "CellLength",
    403         0x0109u,
    404         SHORT,
    405         IFD_0,
    406         1,
    407         UNDEFINED_ENDIAN
    408     },
    409     { // CellWidth
    410         "CellWidth",
    411         0x0108u,
    412         SHORT,
    413         IFD_0,
    414         1,
    415         UNDEFINED_ENDIAN
    416     },
    417     { // ColorMap
    418         "ColorMap",
    419         0x0140u,
    420         SHORT,
    421         IFD_0,
    422         0,
    423         UNDEFINED_ENDIAN
    424     },
    425     { // Compression
    426         "Compression",
    427         0x0103u,
    428         SHORT,
    429         IFD_0,
    430         1,
    431         UNDEFINED_ENDIAN
    432     },
    433     { // Copyright
    434         "Copyright",
    435         0x8298u,
    436         ASCII,
    437         IFD_0,
    438         0,
    439         UNDEFINED_ENDIAN
    440     },
    441     { // DateTime
    442         "DateTime",
    443         0x0132u,
    444         ASCII,
    445         IFD_0,
    446         20,
    447         UNDEFINED_ENDIAN
    448     },
    449     { // ExtraSamples
    450         "ExtraSamples",
    451         0x0152u,
    452         SHORT,
    453         IFD_0,
    454         0,
    455         UNDEFINED_ENDIAN
    456     },
    457     { // FillOrder
    458         "FillOrder",
    459         0x010Au,
    460         SHORT,
    461         IFD_0,
    462         1,
    463         UNDEFINED_ENDIAN
    464     },
    465     { // FreeByteCounts
    466         "FreeByteCounts",
    467         0x0121u,
    468         LONG,
    469         IFD_0,
    470         1,
    471         UNDEFINED_ENDIAN
    472     },
    473     { // FreeOffsets
    474         "FreeOffsets",
    475         0x0120u,
    476         LONG,
    477         IFD_0,
    478         1,
    479         UNDEFINED_ENDIAN
    480     },
    481     { // GrayResponseCurve
    482         "GrayResponseCurve",
    483         0x0123u,
    484         SHORT,
    485         IFD_0,
    486         0,
    487         UNDEFINED_ENDIAN
    488     },
    489     { // GrayResponseUnit
    490         "GrayResponseUnit",
    491         0x0122u,
    492         SHORT,
    493         IFD_0,
    494         1,
    495         UNDEFINED_ENDIAN
    496     },
    497     { // HostComputer
    498         "HostComputer",
    499         0x013Cu,
    500         ASCII,
    501         IFD_0,
    502         0,
    503         UNDEFINED_ENDIAN
    504     },
    505     { // ImageDescription
    506         "ImageDescription",
    507         0x010Eu,
    508         ASCII,
    509         IFD_0,
    510         0,
    511         UNDEFINED_ENDIAN
    512     },
    513     { // ImageLength
    514         "ImageLength",
    515         0x0101u,
    516         LONG,
    517         IFD_0,
    518         1,
    519         UNDEFINED_ENDIAN
    520     },
    521     { // ImageWidth
    522         "ImageWidth",
    523         0x0100u,
    524         LONG,
    525         IFD_0,
    526         1,
    527         UNDEFINED_ENDIAN
    528     },
    529     { // Make
    530         "Make",
    531         0x010Fu,
    532         ASCII,
    533         IFD_0,
    534         0,
    535         UNDEFINED_ENDIAN
    536     },
    537     { // MaxSampleValue
    538         "MaxSampleValue",
    539         0x0119u,
    540         SHORT,
    541         IFD_0,
    542         0,
    543         UNDEFINED_ENDIAN
    544     },
    545     { // MinSampleValue
    546         "MinSampleValue",
    547         0x0118u,
    548         SHORT,
    549         IFD_0,
    550         0,
    551         UNDEFINED_ENDIAN
    552     },
    553     { // Model
    554         "Model",
    555         0x0110u,
    556         ASCII,
    557         IFD_0,
    558         0,
    559         UNDEFINED_ENDIAN
    560     },
    561     { // NewSubfileType
    562         "NewSubfileType",
    563         0x00FEu,
    564         LONG,
    565         IFD_0,
    566         1,
    567         UNDEFINED_ENDIAN
    568     },
    569     { // Orientation
    570         "Orientation",
    571         0x0112u,
    572         SHORT,
    573         IFD_0,
    574         1,
    575         UNDEFINED_ENDIAN
    576     },
    577     { // PhotoMetricInterpretation
    578         "PhotoMetricInterpretation",
    579         0x0106u,
    580         SHORT,
    581         IFD_0,
    582         1,
    583         UNDEFINED_ENDIAN
    584     },
    585     { // PlanarConfiguration
    586         "PlanarConfiguration",
    587         0x011Cu,
    588         SHORT,
    589         IFD_0,
    590         1,
    591         UNDEFINED_ENDIAN
    592     },
    593     { // ResolutionUnit
    594         "ResolutionUnit",
    595         0x0128u,
    596         SHORT,
    597         IFD_0,
    598         1,
    599         UNDEFINED_ENDIAN
    600     },
    601     { // RowsPerStrip
    602         "RowsPerStrip",
    603         0x0116u,
    604         LONG,
    605         IFD_0,
    606         1,
    607         UNDEFINED_ENDIAN
    608     },
    609     { // SamplesPerPixel
    610         "SamplesPerPixel",
    611         0x0115u,
    612         SHORT,
    613         IFD_0,
    614         1,
    615         UNDEFINED_ENDIAN
    616     },
    617     { // Software
    618         "Software",
    619         0x0131u,
    620         ASCII,
    621         IFD_0,
    622         0,
    623         UNDEFINED_ENDIAN
    624     },
    625     { // StripByteCounts
    626         "StripByteCounts",
    627         0x0117u,
    628         LONG,
    629         IFD_0,
    630         0,
    631         UNDEFINED_ENDIAN
    632     },
    633     { // StripOffsets
    634         "StripOffsets",
    635         0x0111u,
    636         LONG,
    637         IFD_0,
    638         0,
    639         UNDEFINED_ENDIAN
    640     },
    641     { // SubfileType
    642         "SubfileType",
    643         0x00FFu,
    644         SHORT,
    645         IFD_0,
    646         1,
    647         UNDEFINED_ENDIAN
    648     },
    649     { // Threshholding
    650         "Threshholding",
    651         0x0107u,
    652         SHORT,
    653         IFD_0,
    654         1,
    655         UNDEFINED_ENDIAN
    656     },
    657     { // XResolution
    658         "XResolution",
    659         0x011Au,
    660         RATIONAL,
    661         IFD_0,
    662         1,
    663         UNDEFINED_ENDIAN
    664     },
    665     { // YResolution
    666         "YResolution",
    667         0x011Bu,
    668         RATIONAL,
    669         IFD_0,
    670         1,
    671         UNDEFINED_ENDIAN
    672     },
    673 };
    674 
    675 /**
    676  * DNG_TAG_DEFINITIONS contains tags defined in the DNG 1.4 spec
    677  */
    678 const TagDefinition_t DNG_TAG_DEFINITIONS[] = {
    679     { // DNGVersion
    680         "DNGVersion",
    681         0xC612u,
    682         BYTE,
    683         IFD_0,
    684         4,
    685         UNDEFINED_ENDIAN
    686     },
    687     { // DNGBackwardVersion
    688         "DNGBackwardVersion",
    689         0xC613u,
    690         BYTE,
    691         IFD_0,
    692         4,
    693         UNDEFINED_ENDIAN
    694     },
    695     { // UniqueCameraModel
    696         "UniqueCameraModel",
    697         0xC614u,
    698         ASCII,
    699         IFD_0,
    700         0,
    701         UNDEFINED_ENDIAN
    702     },
    703     { // LocalizedCameraModel
    704         "LocalizedCameraModel",
    705         0xC615u,
    706         ASCII,
    707         IFD_0,
    708         0,
    709         UNDEFINED_ENDIAN
    710     },
    711     { // CFAPlaneColor
    712         "CFAPlaneColor",
    713         0xC616u,
    714         BYTE,
    715         RAW_IFD,
    716         0,
    717         UNDEFINED_ENDIAN
    718     },
    719     { // CFALayout
    720         "CFALayout",
    721         0xC617u,
    722         SHORT,
    723         RAW_IFD,
    724         1,
    725         UNDEFINED_ENDIAN
    726     },
    727     { // LinearizationTable
    728         "LinearizationTable",
    729         0xC618u,
    730         SHORT,
    731         RAW_IFD,
    732         0,
    733         UNDEFINED_ENDIAN
    734     },
    735     { // BlackLevelRepeatDim
    736         "BlackLevelRepeatDim",
    737         0xC619u,
    738         SHORT,
    739         RAW_IFD,
    740         2,
    741         UNDEFINED_ENDIAN
    742     },
    743     { // BlackLevel
    744         "BlackLevel",
    745         0xC61Au,
    746         RATIONAL,
    747         RAW_IFD,
    748         0,
    749         UNDEFINED_ENDIAN
    750     },
    751     { // BlackLevelDeltaH
    752         "BlackLevelDeltaH",
    753         0xC61Bu,
    754         SRATIONAL,
    755         RAW_IFD,
    756         0,
    757         UNDEFINED_ENDIAN
    758     },
    759     { // BlackLevelDeltaV
    760         "BlackLevelDeltaV",
    761         0xC61Cu,
    762         SRATIONAL,
    763         RAW_IFD,
    764         0,
    765         UNDEFINED_ENDIAN
    766     },
    767     { // WhiteLevel
    768         "WhiteLevel",
    769         0xC61Du,
    770         LONG,
    771         RAW_IFD,
    772         0,
    773         UNDEFINED_ENDIAN
    774     },
    775     { // DefaultScale
    776         "DefaultScale",
    777         0xC61Eu,
    778         RATIONAL,
    779         RAW_IFD,
    780         2,
    781         UNDEFINED_ENDIAN
    782     },
    783     { // BestQualityScale
    784         "BestQualityScale",
    785         0xC65Cu,
    786         RATIONAL,
    787         RAW_IFD,
    788         1,
    789         UNDEFINED_ENDIAN
    790     },
    791     { // DefaultCropOrigin
    792         "DefaultCropOrigin",
    793         0xC61Fu,
    794         LONG,
    795         RAW_IFD,
    796         2,
    797         UNDEFINED_ENDIAN
    798     },
    799     { // DefaultCropSize
    800         "DefaultCropSize",
    801         0xC620u,
    802         LONG,
    803         RAW_IFD,
    804         2,
    805         UNDEFINED_ENDIAN
    806     },
    807     { // CalibrationIlluminant1
    808         "CalibrationIlluminant1",
    809         0xC65Au,
    810         SHORT,
    811         PROFILE_IFD,
    812         1,
    813         UNDEFINED_ENDIAN
    814     },
    815     { // CalibrationIlluminant2
    816         "CalibrationIlluminant2",
    817         0xC65Bu,
    818         SHORT,
    819         PROFILE_IFD,
    820         1,
    821         UNDEFINED_ENDIAN
    822     },
    823     { // ColorMatrix1
    824         "ColorMatrix1",
    825         0xC621u,
    826         SRATIONAL,
    827         PROFILE_IFD,
    828         0,
    829         UNDEFINED_ENDIAN
    830     },
    831     { // ColorMatrix2
    832         "ColorMatrix2",
    833         0xC622u,
    834         SRATIONAL,
    835         PROFILE_IFD,
    836         0,
    837         UNDEFINED_ENDIAN
    838     },
    839     { // CameraCalibration1
    840         "CameraCalibration1",
    841         0xC623u,
    842         SRATIONAL,
    843         IFD_0,
    844         0,
    845         UNDEFINED_ENDIAN
    846     },
    847     { // CameraCalibration2
    848         "CameraCalibration2",
    849         0xC624u,
    850         SRATIONAL,
    851         IFD_0,
    852         0,
    853         UNDEFINED_ENDIAN
    854     },
    855     { // ReductionMatrix1
    856         "ReductionMatrix1",
    857         0xC625u,
    858         SRATIONAL,
    859         PROFILE_IFD,
    860         0,
    861         UNDEFINED_ENDIAN
    862     },
    863     { // ReductionMatrix2
    864         "ReductionMatrix2",
    865         0xC626u,
    866         SRATIONAL,
    867         PROFILE_IFD,
    868         0,
    869         UNDEFINED_ENDIAN
    870     },
    871     { // AnalogBalance
    872         "AnalogBalance",
    873         0xC627u,
    874         RATIONAL,
    875         IFD_0,
    876         0,
    877         UNDEFINED_ENDIAN
    878     },
    879     { // AsShotNeutral
    880         "AsShotNeutral",
    881         0xC628u,
    882         RATIONAL,
    883         IFD_0,
    884         0,
    885         UNDEFINED_ENDIAN
    886     },
    887     { // AsShotWhiteXY
    888         "AsShotWhiteXY",
    889         0xC629u,
    890         RATIONAL,
    891         IFD_0,
    892         2,
    893         UNDEFINED_ENDIAN
    894     },
    895     { // BaselineExposure
    896         "BaselineExposure",
    897         0xC62Au,
    898         SRATIONAL,
    899         IFD_0,
    900         1,
    901         UNDEFINED_ENDIAN
    902     },
    903     { // BaselineNoise
    904         "BaselineNoise",
    905         0xC62Bu,
    906         RATIONAL,
    907         IFD_0,
    908         1,
    909         UNDEFINED_ENDIAN
    910     },
    911     { // BaselineSharpness
    912         "BaselineSharpness",
    913         0xC62Cu,
    914         RATIONAL,
    915         IFD_0,
    916         1,
    917         UNDEFINED_ENDIAN
    918     },
    919     { // BayerGreenSplit
    920         "BayerGreenSplit",
    921         0xC62Du,
    922         LONG,
    923         RAW_IFD,
    924         1,
    925         UNDEFINED_ENDIAN
    926     },
    927     { // LinearResponseLimit
    928         "LinearResponseLimit",
    929         0xC62Eu,
    930         RATIONAL,
    931         IFD_0,
    932         1,
    933         UNDEFINED_ENDIAN
    934     },
    935     { // CameraSerialNumber
    936         "CameraSerialNumber",
    937         0xC62Fu,
    938         ASCII,
    939         IFD_0,
    940         0,
    941         UNDEFINED_ENDIAN
    942     },
    943     { // LensInfo
    944         "LensInfo",
    945         0xC630u,
    946         RATIONAL,
    947         IFD_0,
    948         4,
    949         UNDEFINED_ENDIAN
    950     },
    951     { // ChromaBlurRadius
    952         "ChromaBlurRadius",
    953         0xC631u,
    954         RATIONAL,
    955         RAW_IFD,
    956         1,
    957         UNDEFINED_ENDIAN
    958     },
    959     { // AntiAliasStrength
    960         "AntiAliasStrength",
    961         0xC632u,
    962         RATIONAL,
    963         RAW_IFD,
    964         1,
    965         UNDEFINED_ENDIAN
    966     },
    967     { // ShadowScale
    968         "ShadowScale",
    969         0xC633u,
    970         RATIONAL,
    971         IFD_0,
    972         1,
    973         UNDEFINED_ENDIAN
    974     },
    975     { // DNGPrivateData
    976         "DNGPrivateData",
    977         0xC634u,
    978         BYTE,
    979         IFD_0,
    980         0,
    981         UNDEFINED_ENDIAN
    982     },
    983     { // MakerNoteSafety
    984         "MakerNoteSafety",
    985         0xC635u,
    986         SHORT,
    987         IFD_0,
    988         1,
    989         UNDEFINED_ENDIAN
    990     },
    991     { // RawDataUniqueID
    992         "RawDataUniqueID",
    993         0xC65Du,
    994         BYTE,
    995         IFD_0,
    996         16,
    997         UNDEFINED_ENDIAN
    998     },
    999     { // OriginalRawFileName
   1000         "OriginalRawFileName",
   1001         0xC68Bu,
   1002         ASCII,
   1003         IFD_0,
   1004         0,
   1005         UNDEFINED_ENDIAN
   1006     },
   1007     { // OriginalRawFileData
   1008         "OriginalRawFileData",
   1009         0xC68Cu,
   1010         UNDEFINED,
   1011         IFD_0,
   1012         0,
   1013         BIG
   1014     },
   1015     { // ActiveArea
   1016         "ActiveArea",
   1017         0xC68Du,
   1018         LONG,
   1019         RAW_IFD,
   1020         4,
   1021         UNDEFINED_ENDIAN
   1022     },
   1023     { // MaskedAreas
   1024         "MaskedAreas",
   1025         0xC68Eu,
   1026         LONG,
   1027         RAW_IFD,
   1028         0,
   1029         UNDEFINED_ENDIAN
   1030     },
   1031     { // AsShotICCProfile
   1032         "AsShotICCProfile",
   1033         0xC68Fu,
   1034         UNDEFINED,
   1035         IFD_0,
   1036         0,
   1037         UNDEFINED_ENDIAN
   1038     },
   1039     { // AsShotPreProfileMatrix
   1040         "AsShotPreProfileMatrix",
   1041         0xC690u,
   1042         SRATIONAL,
   1043         IFD_0,
   1044         0,
   1045         UNDEFINED_ENDIAN
   1046     },
   1047     { // CurrentICCProfile
   1048         "CurrentICCProfile",
   1049         0xC691u,
   1050         UNDEFINED,
   1051         IFD_0,
   1052         0,
   1053         UNDEFINED_ENDIAN
   1054     },
   1055     { // CurrentICCProfile
   1056         "CurrentICCProfile",
   1057         0xC691u,
   1058         UNDEFINED,
   1059         IFD_0,
   1060         0,
   1061         UNDEFINED_ENDIAN
   1062     },
   1063     { // CurrentPreProfileMatrix
   1064         "CurrentPreProfileMatrix",
   1065         0xC692u,
   1066         SRATIONAL,
   1067         IFD_0,
   1068         0,
   1069         UNDEFINED_ENDIAN
   1070     },
   1071     { // ColorimetricReference
   1072         "ColorimetricReference",
   1073         0xC6BFu,
   1074         SHORT,
   1075         IFD_0,
   1076         1,
   1077         UNDEFINED_ENDIAN
   1078     },
   1079     { // CameraCalibrationSignature
   1080         "CameraCalibrationSignature",
   1081         0xC6F3u,
   1082         ASCII,
   1083         IFD_0,
   1084         0,
   1085         UNDEFINED_ENDIAN
   1086     },
   1087     { // ProfileCalibrationSignature
   1088         "ProfileCalibrationSignature",
   1089         0xC6F4u,
   1090         ASCII,
   1091         PROFILE_IFD,
   1092         0,
   1093         UNDEFINED_ENDIAN
   1094     },
   1095     { // ExtraCameraProfiles
   1096         "ExtraCameraProfiles",
   1097         0xC6F5u,
   1098         LONG,
   1099         IFD_0,
   1100         0,
   1101         UNDEFINED_ENDIAN
   1102     },
   1103     { // AsShotProfileName
   1104         "AsShotProfileName",
   1105         0xC6F6u,
   1106         ASCII,
   1107         IFD_0,
   1108         0,
   1109         UNDEFINED_ENDIAN
   1110     },
   1111     { // NoiseReductionApplied
   1112         "NoiseReductionApplied",
   1113         0xC6F7u,
   1114         RATIONAL,
   1115         RAW_IFD,
   1116         1,
   1117         UNDEFINED_ENDIAN
   1118     },
   1119     { // ProfileName
   1120         "ProfileName",
   1121         0xC6F8u,
   1122         ASCII,
   1123         PROFILE_IFD,
   1124         0,
   1125         UNDEFINED_ENDIAN
   1126     },
   1127     { // ProfileHueSatMapDims
   1128         "ProfileHueSatMapDims",
   1129         0xC6F9u,
   1130         LONG,
   1131         PROFILE_IFD,
   1132         3,
   1133         UNDEFINED_ENDIAN
   1134     },
   1135     { // ProfileHueSatMapData1
   1136         "ProfileHueSatMapData1",
   1137         0xC6FAu,
   1138         FLOAT,
   1139         PROFILE_IFD,
   1140         0,
   1141         UNDEFINED_ENDIAN
   1142     },
   1143     { // ProfileHueSatMapData2
   1144         "ProfileHueSatMapData2",
   1145         0xC6FBu,
   1146         FLOAT,
   1147         PROFILE_IFD,
   1148         0,
   1149         UNDEFINED_ENDIAN
   1150     },
   1151     { // ProfileToneCurve
   1152         "ProfileToneCurve",
   1153         0xC6FCu,
   1154         FLOAT,
   1155         PROFILE_IFD,
   1156         0,
   1157         UNDEFINED_ENDIAN
   1158     },
   1159     { // ProfileEmbedPolicy
   1160         "ProfileEmbedPolicy",
   1161         0xC6FDu,
   1162         LONG,
   1163         PROFILE_IFD,
   1164         1,
   1165         UNDEFINED_ENDIAN
   1166     },
   1167     { // ProfileCopyright
   1168         "ProfileCopyright",
   1169         0xC6FEu,
   1170         ASCII,
   1171         PROFILE_IFD,
   1172         0,
   1173         UNDEFINED_ENDIAN
   1174     },
   1175     { // ForwardMatrix1
   1176         "ForwardMatrix1",
   1177         0xC714u,
   1178         SRATIONAL,
   1179         PROFILE_IFD,
   1180         0,
   1181         UNDEFINED_ENDIAN
   1182     },
   1183     { // ForwardMatrix2
   1184         "ForwardMatrix2",
   1185         0xC715u,
   1186         SRATIONAL,
   1187         PROFILE_IFD,
   1188         0,
   1189         UNDEFINED_ENDIAN
   1190     },
   1191     { // PreviewApplicationName
   1192         "PreviewApplicationName",
   1193         0xC716u,
   1194         ASCII,
   1195         PREVIEW_IFD,
   1196         0,
   1197         UNDEFINED_ENDIAN
   1198     },
   1199     { // PreviewApplicationVersion
   1200         "PreviewApplicationVersion",
   1201         0xC717u,
   1202         ASCII,
   1203         PREVIEW_IFD,
   1204         0,
   1205         UNDEFINED_ENDIAN
   1206     },
   1207     { // PreviewSettingsName
   1208         "PreviewSettingsName",
   1209         0xC718u,
   1210         ASCII,
   1211         PREVIEW_IFD,
   1212         0,
   1213         UNDEFINED_ENDIAN
   1214     },
   1215     { // PreviewSettingsDigest
   1216         "PreviewSettingsDigest",
   1217         0xC719u,
   1218         BYTE,
   1219         PREVIEW_IFD,
   1220         16,
   1221         UNDEFINED_ENDIAN
   1222     },
   1223     { // PreviewColorSpace
   1224         "PreviewColorSpace",
   1225         0xC71Au,
   1226         LONG,
   1227         PREVIEW_IFD,
   1228         1,
   1229         UNDEFINED_ENDIAN
   1230     },
   1231     { // PreviewDateTime
   1232         "PreviewDateTime",
   1233         0xC71Bu,
   1234         ASCII,
   1235         PREVIEW_IFD,
   1236         0,
   1237         UNDEFINED_ENDIAN
   1238     },
   1239     { // RawImageDigest
   1240         "RawImageDigest",
   1241         0xC71Cu,
   1242         BYTE,
   1243         IFD_0,
   1244         16,
   1245         UNDEFINED_ENDIAN
   1246     },
   1247     { // OriginalRawFileDigest
   1248         "OriginalRawFileDigest",
   1249         0xC71Du,
   1250         BYTE,
   1251         IFD_0,
   1252         16,
   1253         UNDEFINED_ENDIAN
   1254     },
   1255     { // SubTileBlockSize
   1256         "SubTileBlockSize",
   1257         0xC71Eu,
   1258         LONG,
   1259         RAW_IFD,
   1260         2,
   1261         UNDEFINED_ENDIAN
   1262     },
   1263     { // RowInterleaveFactor
   1264         "RowInterleaveFactor",
   1265         0xC71Fu,
   1266         LONG,
   1267         RAW_IFD,
   1268         1,
   1269         UNDEFINED_ENDIAN
   1270     },
   1271     { // ProfileLookTableDims
   1272         "ProfileLookTableDims",
   1273         0xC725u,
   1274         LONG,
   1275         PROFILE_IFD,
   1276         3,
   1277         UNDEFINED_ENDIAN
   1278     },
   1279     { // ProfileLookTableData
   1280         "ProfileLookTableData",
   1281         0xC726u,
   1282         FLOAT,
   1283         PROFILE_IFD,
   1284         0,
   1285         UNDEFINED_ENDIAN
   1286     },
   1287     { // OpcodeList1
   1288         "OpcodeList1",
   1289         0xC740u,
   1290         UNDEFINED,
   1291         RAW_IFD,
   1292         0,
   1293         BIG
   1294     },
   1295     { // OpcodeList2
   1296         "OpcodeList2",
   1297         0xC741u,
   1298         UNDEFINED,
   1299         RAW_IFD,
   1300         0,
   1301         BIG
   1302     },
   1303     { // OpcodeList3
   1304         "OpcodeList3",
   1305         0xC74Eu,
   1306         UNDEFINED,
   1307         RAW_IFD,
   1308         0,
   1309         BIG
   1310     },
   1311     { // NoiseProfile
   1312         "NoiseProfile",
   1313         0xC761u,
   1314         DOUBLE,
   1315         RAW_IFD,
   1316         0,
   1317         UNDEFINED_ENDIAN
   1318     },
   1319     { // DefaultUserCrop
   1320         "DefaultUserCrop",
   1321         0xC7B5u,
   1322         RATIONAL,
   1323         RAW_IFD,
   1324         4,
   1325         UNDEFINED_ENDIAN
   1326     },
   1327     { // DefaultBlackRender
   1328         "DefaultBlackRender",
   1329         0xC7A6u,
   1330         LONG,
   1331         PROFILE_IFD,
   1332         1,
   1333         UNDEFINED_ENDIAN
   1334     },
   1335     { // BaselineExposureOffset
   1336         "BaselineExposureOffset",
   1337         0xC7A5u,
   1338         RATIONAL,
   1339         PROFILE_IFD,
   1340         1,
   1341         UNDEFINED_ENDIAN
   1342     },
   1343     { // ProfileLookTableEncoding
   1344         "ProfileLookTableEncoding",
   1345         0xC7A4u,
   1346         LONG,
   1347         PROFILE_IFD,
   1348         1,
   1349         UNDEFINED_ENDIAN
   1350     },
   1351     { // ProfileHueSatMapEncoding
   1352         "ProfileHueSatMapEncoding",
   1353         0xC7A3u,
   1354         LONG,
   1355         PROFILE_IFD,
   1356         1,
   1357         UNDEFINED_ENDIAN
   1358     },
   1359     { // OriginalDefaultFinalSize
   1360         "OriginalDefaultFinalSize",
   1361         0xC791u,
   1362         LONG,
   1363         IFD_0,
   1364         2,
   1365         UNDEFINED_ENDIAN
   1366     },
   1367     { // OriginalBestQualityFinalSize
   1368         "OriginalBestQualityFinalSize",
   1369         0xC792u,
   1370         LONG,
   1371         IFD_0,
   1372         2,
   1373         UNDEFINED_ENDIAN
   1374     },
   1375     { // OriginalDefaultCropSize
   1376         "OriginalDefaultCropSize",
   1377         0xC793u,
   1378         LONG,
   1379         IFD_0,
   1380         2,
   1381         UNDEFINED_ENDIAN
   1382     },
   1383     { // NewRawImageDigest
   1384         "NewRawImageDigest",
   1385         0xC7A7u,
   1386         BYTE,
   1387         IFD_0,
   1388         16,
   1389         UNDEFINED_ENDIAN
   1390     },
   1391     { // RawToPreviewGain
   1392         "RawToPreviewGain",
   1393         0xC7A8u,
   1394         DOUBLE,
   1395         PREVIEW_IFD,
   1396         1,
   1397         UNDEFINED_ENDIAN
   1398     },
   1399 };
   1400 
   1401 } /*namespace img_utils*/
   1402 } /*namespace android*/
   1403 
   1404 #endif /*IMG_UTILS_TIFF_TAG_DEFINITION_H*/
   1405