From 057e8504c0fffa2b2c67aa1e90fdf2a9ad5d3dac Mon Sep 17 00:00:00 2001 From: "Rob G. Healey" Date: Mon, 14 Dec 2009 12:22:17 +0000 Subject: [PATCH] Finished exiftype.py Will add it to POTFILES.IN in the afternoon. svn: r13799 --- src/gen/lib/exiftype.py | 151 ++++++++++++++++++++++++++++------------ 1 file changed, 105 insertions(+), 46 deletions(-) diff --git a/src/gen/lib/exiftype.py b/src/gen/lib/exiftype.py index 3f383f74d..d93f31583 100644 --- a/src/gen/lib/exiftype.py +++ b/src/gen/lib/exiftype.py @@ -38,53 +38,112 @@ from gen.lib.grampstype import GrampsType class ExifType(GrampsType): - ExifImageMake = 0 - ExifImageModel = 1 - ExifImageOreintation = 2 - ExifImageXResolution = 3 - ExifImageYResolution = 4 - ExifImageResolutionUnit = 5 - ExifImageDateTime = 6 - ExifImageYcbCrPositioning = 7 - ExifImageExifTag = 8 - - ExifPhotoExposureTime = 9 - ExifPhotoFNumber = 10 - ExifPhotoExposureProgram = 11 - ExifPhotoExifVersion = 12 - ExifPhotoDateTimeOriginal = 13 - ExifPhotoDateTimeDigitized = 14 - ExifPhotoComponentsConfiguration = 15 - ExifPhotoCompressedBitsPerPixel = 16 - ExifPhotoExposireBiasValue = 17 - ExifPhotoMaxAperatureValue = 18 - ExifPhotoMeteringMode = 19 - ExifPhotoLightSource = 20 - ExifPhotoFlash = 21 - ExifPhotoFocaLight = 22 - ExifPhotoFlashpixVersion = 23 - ExifPhotoColorSpace = 24 - ExifPhotoPixelXDimension = 25 - ExifPhotoPixelYDimension = 26 - ExifPhotoInteroperabilityTag = 27 - ExifPhotoFileSource = 28 - ExifPhotoSceneTags = 29 - ExifPhotoCustomRendered = 30 - ExifPhotoExposureMode = 31 - ExifPhotoWhiteBalance = 32 - ExifPhotoSceneCaptureType = 33 + """" + Exif Keys/ Tags for Images + """ - ExifThumbnailCompression = 34 - ExifThumbnailMake = 35 - ExifThumbnailModel = 36 - ExifThumbnailOreintation = 37 - ExifThumbnailXResolution = 38 - ExifThumbnailYResolution = 39 - ExifThumbnailResolutionUnit = 40 - ExifThumbnailDateTime = 41 + UNKNOWN = -1 + ExifImageMake = 0 + ExifImageModel = 1 + ExifImageOreintation = 2 + ExifImageXRes = 3 + ExifImageYRes = 4 + ExifImageResUnit = 5 + ExifImageDT = 6 + ExifImageYcbCrPositioning = 7 + ExifImageExifTag = 8 + + ExifPhotoExpsTime = 9 + ExifPhotoFNumber = 10 + ExifPhotoExpsProgram = 11 + ExifPhotoExifVersion = 12 + ExifPhotoDTOriginal = 13 + ExifPhotoDTDigitized = 14 + ExifPhotoComponentsConfiguration = 15 + ExifPhotoCompressedBitsPerPixel = 16 + ExifPhotoExposireBiasValue = 17 + ExifPhotoMaxAperatureValue = 18 + ExifPhotoMeteringMode = 19 + ExifPhotoLightSource = 20 + ExifPhotoFlash = 21 + ExifPhotoFocaLight = 22 + ExifPhotoFlashpixVersion = 23 + ExifPhotoColorSpace = 24 + ExifPhotoPixelXDimension = 25 + ExifPhotoPixelYDimension = 26 + ExifPhotoInteroperabilityTag = 27 + ExifPhotoFileSource = 28 + ExifPhotoSceneTags = 29 + ExifPhotoCustomRendered = 30 + ExifPhotoExpsMode = 31 + ExifPhotoWhiteBalance = 32 + ExifPhotoSceneCaptureType = 33 + + ExifThumbnailCompression = 34 + ExifThumbnailMake = 35 + ExifThumbnailModel = 36 + ExifThumbnailOreintation = 37 + ExifThumbnailXRes = 38 + ExifThumbnailYRes = 39 + ExifThumbnailResUnit = 40 + ExifThumbnailDT = 41 ExifThumbnailJPEGInterchangeFormat = 42 ExifThumbnailJPEGInterchangeLength = 43 - ExifThumbnailYcbCrPositioning = 44 + ExifThumbnailYcbCrPositioning = 44 - ExiftopInteroperabilityIndex = 45 - ExiftopInteroperabilityVersion = 46 + ExiftopInteroperabilityIndex = 45 + ExiftopInteroperabilityVersion = 46 + + _DATAMAP = [ + [UNKNOWN, _("Known"), "Unknown"], + [ExifImageMake, _("Image Make"), "Exif.Image.Make"], + ExifImageModel, _("Image Model"), "Exif.Image.Model"], + ExifImageOreintation, __("Image oreintation"), "Exif.Image.oreintation"], + ExifImageXRes, _("Image X Resolution"), "Exif.Image.XResolution"], + ExifImageYRes, __("Image Y Resolution"), "Exif.Image.YResolution"], + ExifImageResUnit, _("Image Resolution Unit"), "Exif.Image.ResolutionUnit"], + ExifImageDT, _("Image Date Time"), "Exif.Image.DateTime"], + ExifImageYcbCrPositioning, _("Image Ycb Cr Positioning"), "Exif.Image.YcbCrPositioning"], + ExifImageExifTag, _("Image Exif Tag"), "Exif.Image.ExifTag"], + + ExifPhotoExpsTime, _("Photo Exposure Time"), "Exif.Photo.ExposureTime"], + ExifPhotoFNumber, _("Photo F Number"), "Exif.Photo.FNumber"], + ExifPhotoExpsProgram, _("Photo Exposure Program"), "Exif.Photo.ExposureTime"], + ExifPhotoExifVersion, _("Photo Exif Version"), "Exif.Photo.ExifVersion"], + ExifPhotoDTOriginal, _("Photo Date Time Original"), "Exif.Photo.DateTimeOriginal"], + ExifPhotoDTDigitized, _("Photo Date Time Digitized"), "Exif.Photo.DateTimeDigitized"], + ExifPhotoComponentsConfiguration, _("Photo Component Configuration"), "Exif.Photo.ComponentsConfiguration"], + ExifPhotoCompressedBitsPerPixel, _("Photo Compressed Bits Per Pixel"), "Exif.Photo.CompressedBitsPerPixel"], + ExifPhotoExpsBiasValue, _("Photo Exposure Bias Value"), "Exif.Photo.ExposureBiasValue"], + ExifPhotoMaxAperatureValue, _("Photo Max. Aperature Value"), "Exif.Photo.MaxAperatureValue"], + ExifPhotoMeteringMode, _("Photo Metering Mode"), "Exif.Photo.MeteringMode"], + ExifPhotoLightSource, _("Photo Light Source"), "Exif.Photo.LightSource"], + ExifPhotoFlash, _("Photo Flash"), "Exif.Photo.Flash"], + ExifPhotoFocaLight, _("Photo Focal Light"), "Exif.Photo.FocalLight"], + ExifPhotoFlashpixVersion, _("Photo Flash Pixel Version"), "Exif.Photo.FlashpixVersion"], + ExifPhotoColorSpace, _("Photo Color Space"), "Exif.Photo.ColorSpace"], + ExifPhotoPixelXDimension, _("Photo Pixrl X Dimension"), "Exif.Photo.PixelXDminension"], + ExifPhotoPixelYDimension, _("Photo Pixel Y Dimension"), "Exif.Photo.PixelYDimension"], + ExifPhotoInteroperabilityTag, _("Photo Interoperability Tag"), "Exif.Photo.InteroperabilityTag"], + ExifPhotoFileSource, _("Photo File Source"), "Exif.Photo.FileSource"], + ExifPhotoSceneTags, _("Photo Scene tags"), "Exif.Photo.SceneTags"], + ExifPhotoCustomRendered, _("Photo Custom Rendered"), "Exif.photo.CustomRendered"], + ExifPhotoExpsMode, _("Photo Exposure Mode"), "Exif.Photo.ExposureMode"], + ExifPhotoWhiteBalance, _("Photo White Balance"), "Exif.Photo.WhiteBalance"], + ExifPhotoSceneCaptureType, _("Photo Scene Capture Type"), "Exif.Photo.SceneCaptureType"], + + ExifThumbnailCompression, _("Thumbnail Compression"), ""Exif.Thumbnail.Compression"], + ExifThumbnailMake, _("Thumbnail Make"), "Exif.Thumbnail.Make"], + ExifThumbnailModel, _("Thumbnail Model"), "Exif.Thumbnail.Model"], + ExifThumbnailOreintation, _("Thumbnail Oreintation"), "Exif.Thumbnail.Oreintation"], + ExifThumbnailXRes, _("Thumbnail X Resolution"), "Exif.Thumbnail.XResolution"], + ExifThumbnailYRes, _("Thumbnail Y Resolution"), "Exif.Thumbnail.YResolution"], + ExifThumbnailResUnit, _("Thumbnail Resolution Unit"), "Exif.Thumbnail.YResolutionUnit"], + ExifThumbnailDT, _("Thumbnail Date Time"), "Exif.Thumbnail.DateTime"], + ExifThumbnailJPEGInterchangeFormat, _("Jpeg Interchange Format"), "Exif.Thumbnail.JPEGInterchangeFormat"], + ExifThumbnailJPEGInterchangeLength, _("JPEG Interchange Length"), "Exif.Thumbnail.JPEGInterchangeLength"], + ExifThumbnailYcbCrPositioning, _("Thumbnail Ycb Cr Positioning"), "Exif.Thumbnail.YcbCrPositioning"], + + ExiftopInteroperabilityIndex, _("Top Interoperability Index"), "Exif.top.InteroperabilityIndex"], + ExiftopInteroperabilityVersion, _("Top Interoperability Version"), "Exif.top.InteroperabilityVersion"] + ]