From: Lutz Mueller Date: Wed, 1 Sep 2004 20:15:06 +0000 (+0200) Subject: 2004-09-01 Lutz Mueller X-Git-Tag: libexif-0_6_21-release~735 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=08088cc98e0fc17494d73c522584b591d411ebbc;p=platform%2Fupstream%2Flibexif.git 2004-09-01 Lutz Mueller * libexif/exif-tag.c: First ideas on how to support generation of mandatory exif tags for a new image. --- diff --git a/ChangeLog b/ChangeLog index 13e1a7f..b170019 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2004-09-01 Lutz Mueller + * libexif/exif-tag.c: First ideas on how to support generation of + mandatory exif tags for a new image. + +2004-09-01 Lutz Mueller + Suggestion by Angela Wrobel (http://www.wrobelnet.de/contact.html): * libexif/pentax: diff --git a/README b/README index 4ab86e5..cc960e4 100644 --- a/README +++ b/README @@ -40,6 +40,7 @@ Right now, I know of the following frontends to libexif: - gtkam: A GTK+ frontend to libgphoto2 (http://www.topfrose.de). - thirdeye: Digital photos organizer and driver for eComStation (http://ecomstation.ru/thirdeye). + - digicam: If you would like to migrate your program to use libexif or add EXIF support to it, don't hesitate to contact the authors. @@ -56,6 +57,12 @@ libexif includes a 'libjpeg' that is 'educational code to illustrate the syntax of JPEG files'. Please ignore it. It is a bug that it is distributed, but I think it may be useful for other people. +TODO +---- + +We should probably support the generation of an empty EXIF structure with all +mandatory tags. First ideas are in exif-tag.c. This has not yet been finished. + AUTHORS ------- diff --git a/libexif/exif-tag.c b/libexif/exif-tag.c index 0cc57b2..c0e256d 100644 --- a/libexif/exif-tag.c +++ b/libexif/exif-tag.c @@ -24,11 +24,19 @@ #include +typedef enum { + ESL_MANDATORY = 1, /* Mandatory */ + ESL_CMANDATORY = 2, /* Conditionally mandatory */ + ESL_OPTIONAL = 3, /* Optional */ + ESL_NOT_RECORDED = 4 /* Not recorded */ +} ExifSL; /* Exif Support Level */ + static struct { ExifTag tag; const char *name; const char *title; const char *description; + ExifSL esl_0[4], esl_1[4], esl_exif[4], esl_gps[4]; } ExifTagTable[] = { {EXIF_TAG_INTEROPERABILITY_INDEX, "InteroperabilityIndex", "InteroperabilityIndex", @@ -42,24 +50,29 @@ static struct { {EXIF_TAG_IMAGE_WIDTH, "ImageWidth", N_("Image Width"), N_("The number of columns of image data, equal to the number of " "pixels per row. In JPEG compressed data a JPEG marker is " - "used instead of this tag.")}, + "used instead of this tag."), + {ESL_MANDATORY, ESL_MANDATORY, ESL_MANDATORY, ESL_NOT_RECORDED}}, {EXIF_TAG_IMAGE_LENGTH, "ImageLength", N_("Image Length"), N_("The number of rows of image data. In JPEG compressed data a " - "JPEG marker is used instead of this tag.")}, + "JPEG marker is used instead of this tag."), + {ESL_MANDATORY, ESL_MANDATORY, ESL_MANDATORY, ESL_NOT_RECORDED}}, {EXIF_TAG_BITS_PER_SAMPLE, "BitsPerSample", N_("Bits per Sample"), N_("The number of bits per image component. In this standard each " "component of the image is 8 bits, so the value for this " "tag is 9. See also . In JPEG compressed data " - "a JPEG marker is used instead of this tag.")}, + "a JPEG marker is used instead of this tag."), + {ESL_MANDATORY, ESL_MANDATORY, ESL_MANDATORY, ESL_NOT_RECORDED}}, {EXIF_TAG_COMPRESSION, "Compression", N_("Compression"), N_("The compression scheme used for the image data. When a " "primary image is JPEG compressed, this designation is " "not necessary and is omitted. When thumbnails use JPEG " - "compression, this tag value is set to 6.")}, + "compression, this tag value is set to 6."), + {ESL_MANDATORY, ESL_MANDATORY, ESL_MANDATORY, ESL_NOT_RECORDED}}, {EXIF_TAG_PHOTOMETRIC_INTERPRETATION, "PhotometricInterpretation", N_("Photometric Interpretation"), N_("The pixel composition. In JPEG compressed data a JPEG " - "marker is used instead of this tag.")}, + "marker is used instead of this tag."), + {ESL_MANDATORY, ESL_MANDATORY, ESL_MANDATORY, ESL_NOT_RECORDED}}, {EXIF_TAG_FILL_ORDER, "FillOrder", N_("Fill Order"), ""}, {EXIF_TAG_DOCUMENT_NAME, "DocumentName", N_("Document Name"), ""}, {EXIF_TAG_IMAGE_DESCRIPTION, "ImageDescription", @@ -68,26 +81,31 @@ static struct { "a comment such as \"1988 company picnic\" or " "the like. Two-bytes character codes cannot be used. " "When a 2-bytes code is necessary, the Exif Private tag " - " is to be used.")}, + " is to be used."), + {ESL_CMANDATORY, ESL_CMANDATORY, ESL_CMANDATORY, ESL_CMANDATORY}}, {EXIF_TAG_MAKE, "Make", N_("Manufacturer"), N_("The manufacturer of the recording " "equipment. This is the manufacturer of the DSC, scanner, " "video digitizer or other equipment that generated the " "image. When the field is left blank, it is treated as " - "unknown.")}, + "unknown."), + {ESL_CMANDATORY, ESL_CMANDATORY, ESL_CMANDATORY, ESL_CMANDATORY}}, {EXIF_TAG_MODEL, "Model", N_("Model"), N_("The model name or model number of the equipment. This is the " "model name or number of the DSC, scanner, video digitizer " "or other equipment that generated the image. When the field " - "is left blank, it is treated as unknown.")}, + "is left blank, it is treated as unknown."), + {ESL_CMANDATORY, ESL_CMANDATORY, ESL_CMANDATORY, ESL_CMANDATORY}}, {EXIF_TAG_STRIP_OFFSETS, "StripOffsets", N_("Strip Offsets"), N_("For each strip, the byte offset of that strip. It is " "recommended that this be selected so the number of strip " "bytes does not exceed 64 Kbytes. With JPEG compressed " "data this designation is not needed and is omitted. See also " - " and .")}, + " and ."), + {ESL_CMANDATORY, ESL_CMANDATORY, ESL_CMANDATORY, ESL_CMANDATORY}}, {EXIF_TAG_ORIENTATION, "Orientation", N_("Orientation"), - N_("The image orientation viewed in terms of rows and columns.")}, + N_("The image orientation viewed in terms of rows and columns."), + {ESL_CMANDATORY, ESL_CMANDATORY, ESL_CMANDATORY, ESL_CMANDATORY}}, {EXIF_TAG_SAMPLES_PER_PIXEL, "SamplesPerPixel", N_("Samples per Pixel"), N_("The number of components per pixel. Since this standard applies "