From: Dan Fandrich Date: Tue, 13 Jan 2009 01:46:13 +0000 (-0800) Subject: Fixed the interpretation of some tags as being optional in IFD 1 X-Git-Tag: libexif-0_6_21-release~173 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e266a35d26fe257efb2bbdc7ff6adf7f445c87c2;p=platform%2Fupstream%2Flibexif.git Fixed the interpretation of some tags as being optional in IFD 1 (to match the EXIF 2.2 spec) which stops them from being erroneously removed from a file --- diff --git a/NEWS b/NEWS index e19d850..91afa40 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,9 @@ libexif-0.6.x: * Fixed some Olympus/Sanyo MakerNote interpretations * Fixed bug #1946138 to stop ignoring CFLAGS in the sqrt configure test * Added remaining GPS tags from the EXIF 2.2 spec to the tag table + * Fixed the interpretation of some tags as being optional in IFD 1 + (to match the EXIF 2.2 spec) which stops them from being erroneously + removed from a file libexif-0.6.17 (2008-11-06): * Updated translations: cs, de, pl, sk, vi diff --git a/libexif/exif-tag.c b/libexif/exif-tag.c index 6d63dd9..c51ed66 100644 --- a/libexif/exif-tag.c +++ b/libexif/exif-tag.c @@ -43,7 +43,8 @@ static const struct { const char *name; const char *title; const char *description; - ExifSupportLevel esl[EXIF_IFD_COUNT][4]; + /*! indexed by the types [ExifIfd][ExifDataType] */ + ExifSupportLevel esl[EXIF_IFD_COUNT][EXIF_DATA_TYPE_COUNT]; } ExifTagTable[] = { #ifndef NO_VERBOSE_TAG_STRINGS {EXIF_TAG_NEW_SUBFILE_TYPE, "NewSubfileType", @@ -163,7 +164,7 @@ static const struct { N_("A transfer function for the image, described in tabular style. " "Normally this tag is not necessary, since color space is " "specified in the color space information tag ()."), - { ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } }, + { ESL_OOOO, ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN } }, {EXIF_TAG_SOFTWARE, "Software", N_("Software"), N_("This tag records the name and version of the software or " "firmware of the camera or image input device used to " @@ -171,29 +172,29 @@ static const struct { "it is recommended that the example shown below be " "followed. When the field is left blank, it is treated as " "unknown."), - { ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } }, + { ESL_OOOO, ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN } }, {EXIF_TAG_DATE_TIME, "DateTime", N_("Date and Time"), N_("The date and time of image creation. In this standard " "(EXIF-2.1) it is the date and time the file was changed."), - { ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } }, + { ESL_OOOO, ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN } }, {EXIF_TAG_ARTIST, "Artist", N_("Artist"), N_("This tag records the name of the camera owner, photographer or " "image creator. The detailed format is not specified, but it is " "recommended that the information be written as in the example " "below for ease of Interoperability. When the field is " "left blank, it is treated as unknown."), - { ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } }, + { ESL_OOOO, ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN } }, {EXIF_TAG_WHITE_POINT, "WhitePoint", N_("White Point"), N_("The chromaticity of the white point of the image. Normally " "this tag is not necessary, since color space is specified " "in the color space information tag ()."), - { ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } }, + { ESL_OOOO, ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN } }, {EXIF_TAG_PRIMARY_CHROMATICITIES, "PrimaryChromaticities", N_("Primary Chromaticities"), N_("The chromaticity of the three primary colors of the image. " "Normally this tag is not necessary, since color space is " "specified in the color space information tag ()."), - { ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } }, + { ESL_OOOO, ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN } }, {EXIF_TAG_TRANSFER_RANGE, "TransferRange", N_("Transfer Range"), ""}, {EXIF_TAG_SUB_IFDS, "SubIFDs", "SubIFD Offsets", N_("Defined by Adobe Corporation " "to enable TIFF Trees within a TIFF file.")}, @@ -254,7 +255,7 @@ static const struct { "in a color space information tag, with the default " "being the value that gives the optimal image characteristics " "Interoperability these conditions."), - { ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } }, + { ESL_OOOO, ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN } }, {EXIF_TAG_XML_PACKET, "XMLPacket", N_("XML Packet"), N_("XMP Metadata")}, {EXIF_TAG_RELATED_IMAGE_FILE_FORMAT, "RelatedImageFileFormat", "RelatedImageFileFormat", ""}, @@ -291,7 +292,7 @@ static const struct { "by a terminating NULL code, then the editor copyright is given " "(see example 3). When the field is left blank, it is treated " "as unknown."), - { ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } }, + { ESL_OOOO, ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN } }, {EXIF_TAG_EXPOSURE_TIME, "ExposureTime", N_("Exposure Time"), N_("Exposure time, given in seconds (sec)."), { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },