00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include <config.h>
00022 #include "mnote-olympus-tag.h"
00023
00024 #include <libexif/i18n.h>
00025 #include <libexif/exif-utils.h>
00026
00027 #include <stdlib.h>
00028
00029 static const struct {
00030 MnoteOlympusTag tag;
00031 const char *name;
00032 const char *title;
00033 const char *description;
00034 } table[] = {
00035 #ifndef NO_VERBOSE_TAG_STRINGS
00036
00037 {MNOTE_NIKON_TAG_FIRMWARE, "Firmware", N_("Firmware Version"), ""},
00038 {MNOTE_NIKON_TAG_ISO, "ISO", N_("ISO Setting"), ""},
00039 {MNOTE_NIKON_TAG_COLORMODE1, "ColorMode1", N_("Color Mode (?)"), ""},
00040 {MNOTE_NIKON_TAG_QUALITY, "Quality", N_("Quality"), ""},
00041 {MNOTE_NIKON_TAG_WHITEBALANCE, "WhiteBalance", N_("White Balance"), ""},
00042 {MNOTE_NIKON_TAG_SHARPENING, "Sharpening", N_("Image Sharpening"), ""},
00043 {MNOTE_NIKON_TAG_FOCUSMODE, "FocusMode", N_("Focus Mode"), ""},
00044 {MNOTE_NIKON_TAG_FLASHSETTING, "FlashSetting", N_("Flash Setting"), ""},
00045 {MNOTE_NIKON_TAG_FLASHMODE, "FlashMode", N_("Flash Mode"), ""},
00046 {MNOTE_NIKON_TAG_WHITEBALANCEFINE,"WhiteBalanceFine",N_("White Balance Fine Adjustment"), ""},
00047 {MNOTE_NIKON_TAG_WHITEBALANCERB, "WhiteBalanceRB", N_("White Balance RB"), ""},
00048 {MNOTE_NIKON_TAG_UNKNOWN_0X000D, NULL, NULL, NULL},
00049 {MNOTE_NIKON_TAG_ISOSELECTION, "ISOSelection", N_("ISO Selection"), ""},
00050 {MNOTE_NIKON_TAG_PREVIEWIMAGE_IFD_POINTER, "PreviewImage", N_("Preview Image IFD"), N_("Offset of the preview image directory (IFD) inside the file.")},
00051 {MNOTE_NIKON_TAG_EXPOSUREDIFF, "ExposureDiff", N_("Exposurediff ?"), ""},
00052 {MNOTE_NIKON_TAG_FLASHEXPCOMPENSATION, "FlashExpCompensation", N_("Flash Exposure Compensation"), ""},
00053 {MNOTE_NIKON_TAG_ISO2, "ISO", N_("ISO Setting"), ""},
00054 {MNOTE_NIKON_TAG_IMAGEBOUNDARY, "ImageBoundary", N_("Image Boundary"), ""},
00055 {MNOTE_NIKON_TAG_UNKNOWN_0X0017, NULL, NULL, NULL},
00056 {MNOTE_NIKON_TAG_FLASHEXPOSUREBRACKETVAL, "FlashExposureBracketVal", N_("Flash Exposure Bracket Value"), ""},
00057 {MNOTE_NIKON_TAG_EXPOSUREBRACKETVAL, "ExposureBracketVal", N_("Exposure Bracket Value"), ""},
00058 {MNOTE_NIKON_TAG_IMAGEADJUSTMENT, "ImageAdjustment", N_("Image Adjustment"), ""},
00059 {MNOTE_NIKON_TAG_TONECOMPENSATION, "ToneCompensation", N_("Tone Compensation"), ""},
00060 {MNOTE_NIKON_TAG_ADAPTER, "Adapter", N_("Adapter"), ""},
00061 {MNOTE_NIKON_TAG_LENSTYPE, "LensType", N_("Lens Type"), ""},
00062 {MNOTE_NIKON_TAG_LENS, "Lens", N_("Lens"), ""},
00063 {MNOTE_NIKON_TAG_MANUALFOCUSDISTANCE, "ManualFocusDistance", N_("Manual Focus Distance"), ""},
00064 {MNOTE_NIKON_TAG_DIGITALZOOM, "DigitalZoom", N_("Digital Zoom"), ""},
00065 {MNOTE_NIKON_TAG_FLASHUSED, "FlashUsed", N_("Flash Used"), ""},
00066 {MNOTE_NIKON_TAG_AFFOCUSPOSITION, "AFFocusPosition", N_("AF Focus Position"), ""},
00067 {MNOTE_NIKON_TAG_BRACKETING, "Bracketing", N_("Bracketing"), ""},
00068 {MNOTE_NIKON_TAG_UNKNOWN_0X008A, NULL, NULL, NULL},
00069 {MNOTE_NIKON_TAG_LENS_FSTOPS, "LensFStops", N_("Lens F Stops"), ""},
00070 {MNOTE_NIKON_TAG_CURVE, "Curve,", N_("Contrast Curve"), ""},
00071 {MNOTE_NIKON_TAG_COLORMODE, "ColorMode,", N_("Color Mode"), ""},
00072 {MNOTE_NIKON_TAG_LIGHTTYPE, "LightType,", N_("Light Type"), ""},
00073 {MNOTE_NIKON_TAG_UNKNOWN_0X0091, NULL, NULL, NULL},
00074 {MNOTE_NIKON_TAG_HUE, "Hue", N_("Hue Adjustment"), ""},
00075 {MNOTE_NIKON_TAG_SATURATION, "Saturation", N_("Saturation"), ""},
00076 {MNOTE_NIKON_TAG_NOISEREDUCTION, "NoiseReduction,", N_("Noise Reduction"), ""},
00077 {MNOTE_NIKON_TAG_UNKNOWN_0X0097, NULL, NULL, NULL},
00078 {MNOTE_NIKON_TAG_UNKNOWN_0X0098, NULL, NULL, NULL},
00079 {MNOTE_NIKON_TAG_SENSORPIXELSIZE, "SensorPixelSize", N_("Sensor Pixel Size"), ""},
00080 {MNOTE_NIKON_TAG_UNKNOWN_0X009B, NULL, NULL, NULL},
00081 {MNOTE_NIKON_TAG_SERIALNUMBER, "SerialNumber", N_("Serial Number"), ""},
00082 {MNOTE_NIKON_TAG_IMAGE_DATASIZE, "ImageDataSize", N_("Image Data Size"), N_("Size of compressed image data in bytes.")},
00083 {MNOTE_NIKON_TAG_UNKNOWN_0X00A3, NULL, NULL, NULL},
00084 {MNOTE_NIKON_TAG_TOTALPICTURES, "TotalPictures,", N_("Total Number of Pictures Taken"), ""},
00085 {MNOTE_NIKON_TAG_UNKNOWN_0X00A8, NULL, NULL, NULL},
00086 {MNOTE_NIKON_TAG_OPTIMIZATION, "Optimization,", N_("Optimize Image"), ""},
00087 {MNOTE_NIKON_TAG_SATURATION, "Saturation", N_("Saturation"), ""},
00088 {MNOTE_NIKON_TAG_VARIPROGRAM, "VariProgram", N_("Vari Program"), ""},
00089 {MNOTE_NIKON_TAG_CAPTUREEDITORDATA, "CaptureEditorData", N_("Capture Editor Data"), ""},
00090 {MNOTE_NIKON_TAG_CAPTUREEDITORVER, "CaptureEditorVer", N_("Capture Editor Version"), ""},
00091 {MNOTE_NIKON_TAG_UNKNOWN_0X0E0E, NULL, NULL, NULL},
00092 {MNOTE_NIKON_TAG_UNKNOWN_0X0E10, NULL, NULL, NULL},
00093 {MNOTE_NIKON1_TAG_UNKNOWN_0X0002, NULL, NULL, NULL},
00094 {MNOTE_NIKON1_TAG_QUALITY, "Quality", N_("Quality"), ""},
00095 {MNOTE_NIKON1_TAG_COLORMODE, "ColorMode,", N_("Color Mode"), ""},
00096 {MNOTE_NIKON1_TAG_IMAGEADJUSTMENT, "ImageAdjustment", N_("Image Adjustment"), ""},
00097 {MNOTE_NIKON1_TAG_CCDSENSITIVITY, "CCDSensitivity", N_("CCD Sensitivity"), ""},
00098 {MNOTE_NIKON1_TAG_WHITEBALANCE, "WhiteBalance", N_("White Balance"), ""},
00099 {MNOTE_NIKON1_TAG_FOCUS, "Focus", N_("Focus"), ""},
00100 {MNOTE_NIKON1_TAG_UNKNOWN_0X0009, NULL, NULL, NULL},
00101 {MNOTE_NIKON1_TAG_DIGITALZOOM, "DigitalZoom", N_("Digital Zoom"), ""},
00102 {MNOTE_NIKON1_TAG_CONVERTER, "Converter", N_("Converter"), ""},
00103
00104
00105 {MNOTE_OLYMPUS_TAG_THUMBNAILIMAGE, "ThumbnailImage", N_("Thumbnail Image"), ""},
00106 {MNOTE_OLYMPUS_TAG_MODE, "Mode", N_("Speed/Sequence/Panorama Direction"), ""},
00107 {MNOTE_OLYMPUS_TAG_QUALITY, "Quality", N_("Quality"), ""},
00108 {MNOTE_OLYMPUS_TAG_MACRO, "Macro", N_("Macro"), ""},
00109 {MNOTE_OLYMPUS_TAG_BWMODE, "BWMode", N_("Black & White Mode"), ""},
00110 {MNOTE_OLYMPUS_TAG_DIGIZOOM, "DigiZoom", N_("Digital Zoom"), ""},
00111 {MNOTE_OLYMPUS_TAG_FOCALPLANEDIAGONAL, "FocalPlaneDiagonal", N_("Focal Plane Diagonal"), ""},
00112 {MNOTE_OLYMPUS_TAG_LENSDISTORTION, "LensDistortionParams", N_("Lens Distortion Parameters"), ""},
00113 {MNOTE_OLYMPUS_TAG_VERSION, "FirmwareVersion", N_("Firmware Version"), ""},
00114 {MNOTE_OLYMPUS_TAG_INFO, "Info", N_("Info"), ""},
00115 {MNOTE_OLYMPUS_TAG_ID, "CameraID", N_("Camera ID"), ""},
00116 {MNOTE_OLYMPUS_TAG_PRECAPTUREFRAMES, "PreCaptureFrames", N_("Precapture Frames"), ""},
00117 {MNOTE_OLYMPUS_TAG_WHITEBOARD, "WhiteBoard", N_("White Board"), ""},
00118 {MNOTE_OLYMPUS_TAG_ONETOUCHWB, "OneTouchWB", N_("One Touch White Balance"), ""},
00119 {MNOTE_OLYMPUS_TAG_WHITEBALANCEBRACKET, "WhiteBalanceBracket", N_("White Balance Bracket"), ""},
00120 {MNOTE_OLYMPUS_TAG_WHITEBALANCEBIAS, "WhiteBalanceBias", N_("White Balance Bias"), ""},
00121 {MNOTE_OLYMPUS_TAG_DATADUMP, "DataDump", N_("Data Dump"), NULL},
00122 {MNOTE_OLYMPUS_TAG_UNKNOWN_4, NULL, NULL, NULL},
00123 {MNOTE_OLYMPUS_TAG_SHUTTERSPEED, "ShutterSpeed", N_("Shutter Speed"), ""},
00124 {MNOTE_OLYMPUS_TAG_ISOVALUE, "ISOValue", N_("ISO Value"), ""},
00125 {MNOTE_OLYMPUS_TAG_APERTUREVALUE, "ApertureValue", N_("Aperture Value"), ""},
00126 {MNOTE_OLYMPUS_TAG_BRIGHTNESSVALUE, "BrightnessValue", N_("Brightness Value"), ""},
00127 {MNOTE_OLYMPUS_TAG_FLASHMODE, "FlashMode", N_("Flash Mode"), ""},
00128 {MNOTE_OLYMPUS_TAG_FLASHDEVICE, "FlashDevice", N_("Flash Device"), ""},
00129 {MNOTE_OLYMPUS_TAG_EXPOSURECOMP, "ExposureCompensation", N_("Exposure Compensation"), ""},
00130 {MNOTE_OLYMPUS_TAG_SENSORTEMPERATURE, "SensorTemperature", N_("Sensor Temperature"), ""},
00131 {MNOTE_OLYMPUS_TAG_LENSTEMPERATURE, "LensTemperature", N_("Lens Temperature"), ""},
00132 {MNOTE_OLYMPUS_TAG_LIGHTCONDITION, "LightCondition", N_("Light Condition"), ""},
00133 {MNOTE_OLYMPUS_TAG_FOCUSRANGE, "FocusRange", N_("Focus Range"), ""},
00134 {MNOTE_OLYMPUS_TAG_MANFOCUS, "FocusMode", N_("Focus Mode"), "Automatic or manual focusing mode"},
00135 {MNOTE_OLYMPUS_TAG_FOCUSDIST, "ManualFocusDistance", N_("Manual Focus Distance"), ""},
00136 {MNOTE_OLYMPUS_TAG_ZOOMSTEPCOUNT, "ZoomStepCount", N_("Zoom Step Count"), ""},
00137 {MNOTE_OLYMPUS_TAG_FOCUSSTEPCOUNT, "FocusStepCount", N_("Focus Step Count"), ""},
00138 {MNOTE_OLYMPUS_TAG_SHARPNESS, "Sharpness", N_("Sharpness Setting"), ""},
00139 {MNOTE_OLYMPUS_TAG_FLASHCHARGELEVEL, "FlashChargeLevel", N_("Flash Charge Level"), ""},
00140 {MNOTE_OLYMPUS_TAG_COLORMATRIX, "ColorMatrix", N_("Color Matrix"), ""},
00141 {MNOTE_OLYMPUS_TAG_BLACKLEVEL, "BlackLevel", N_("Black Level"), ""},
00142 {MNOTE_OLYMPUS_TAG_WBALANCE, "WhiteBalance", N_("White Balance Setting"), ""},
00143 {MNOTE_OLYMPUS_TAG_REDBALANCE, "RedBalance", N_("Red Balance"), ""},
00144 {MNOTE_OLYMPUS_TAG_BLUEBALANCE, "BlueBalance", N_("Blue Balance"), ""},
00145 {MNOTE_OLYMPUS_TAG_COLORMATRIXNUMBER, "ColorMatrixNumber", N_("Color Matrix Number"), ""},
00146 {MNOTE_OLYMPUS_TAG_SERIALNUMBER2, "SerialNumber", N_("Serial Number"), ""},
00147 {MNOTE_OLYMPUS_TAG_FLASHEXPOSURECOMP, "FlashExposureComp", N_("Flash Exposure Comp"), ""},
00148 {MNOTE_OLYMPUS_TAG_INTERNALFLASHTABLE, "InternalFlashTable", N_("Internal Flash Table"), ""},
00149 {MNOTE_OLYMPUS_TAG_EXTERNALFLASHGVALUE, "ExternalFlashGValue", N_("External Flash G Value"), ""},
00150 {MNOTE_OLYMPUS_TAG_EXTERNALFLASHBOUNCE, "ExternalFlashBounce", N_("External Flash Bounce"), ""},
00151 {MNOTE_OLYMPUS_TAG_EXTERNALFLASHZOOM, "ExternalFlashZoom", N_("External Flash Zoom"), ""},
00152 {MNOTE_OLYMPUS_TAG_EXTERNALFLASHMODE, "ExternalFlashMode", N_("External Flash Mode"), ""},
00153 {MNOTE_OLYMPUS_TAG_CONTRAST, "Contrast", N_("Contrast Setting"), ""},
00154 {MNOTE_OLYMPUS_TAG_SHARPNESSFACTOR, "SharpnessFactor", N_("Sharpness Factor"), ""},
00155 {MNOTE_OLYMPUS_TAG_COLORCONTROL, "ColorControl", N_("Color Control"), ""},
00156 {MNOTE_OLYMPUS_TAG_IMAGEWIDTH, "OlympusImageWidth", N_("Olympus Image Width"), ""},
00157 {MNOTE_OLYMPUS_TAG_IMAGEHEIGHT, "OlympusImageHeight", N_("Olympus Image Height"), ""},
00158 {MNOTE_OLYMPUS_TAG_SCENEDETECT, "SceneDetect", N_("Scene Detect"), ""},
00159 {MNOTE_OLYMPUS_TAG_COMPRESSIONRATIO, "CompressionRatio", N_("Compression Ratio"), ""},
00160 {MNOTE_OLYMPUS_TAG_PREVIEWIMAGEVALID, "PreviewImageValid", N_("Preview Image Valid"), ""},
00161 {MNOTE_OLYMPUS_TAG_AFRESULT, "AFResult", N_("AF Result"), ""},
00162 {MNOTE_OLYMPUS_TAG_CCDSCANMODE, "CCDScanMode", N_("CCD Scan Mode"), ""},
00163 {MNOTE_OLYMPUS_TAG_NOISEREDUCTION, "NoiseReduction", N_("Noise Reduction"), ""},
00164 {MNOTE_OLYMPUS_TAG_INFINITYLENSSTEP, "InfinityLensStep", N_("Infinity Lens Step"), ""},
00165 {MNOTE_OLYMPUS_TAG_NEARLENSSTEP, "NearLensStep", N_("Near Lens Step"), ""},
00166 {MNOTE_OLYMPUS_TAG_LIGHTVALUECENTER, "LightValueCenter", N_("Light Value Center"), ""},
00167 {MNOTE_OLYMPUS_TAG_LIGHTVALUEPERIPHERY, "LightValuePeriphery", N_("Light Value Periphery"), ""},
00168
00169
00170 {MNOTE_SANYO_TAG_SEQUENTIALSHOT, "SequentialShot", N_("Sequential Shot"), ""},
00171 {MNOTE_SANYO_TAG_WIDERANGE, "WideRange", N_("Wide Range"), ""},
00172 {MNOTE_SANYO_TAG_COLORADJUSTMENTMODE, "ColorAdjustmentMode", N_("Color Adjustment Mode"), ""},
00173 {MNOTE_SANYO_TAG_FOCUSMODE, "FocusMode", N_("Focus Mode"), ""},
00174 {MNOTE_SANYO_TAG_QUICKSHOT, "QuickShot", N_("Quick Shot"), ""},
00175 {MNOTE_SANYO_TAG_SELFTIMER, "SelfTimer", N_("Self-timer"), ""},
00176 {MNOTE_SANYO_TAG_VOICEMEMO, "VoiceMemo", N_("Voice Memo"), ""},
00177 {MNOTE_SANYO_TAG_RECORDSHUTTERRELEASE, "RecordShutterRelease", N_("Record Shutter Release"), ""},
00178 {MNOTE_SANYO_TAG_FLICKERREDUCE, "FlickerReduce", N_("Flicker Reduce"), ""},
00179 {MNOTE_SANYO_TAG_OPTICALZOOM, "OpticalZoom", N_("Optical Zoom"), ""},
00180 {MNOTE_SANYO_TAG_DIGITALZOOM, "DigitalZoom", N_("Digital Zoom"), ""},
00181 {MNOTE_SANYO_TAG_LIGHTSOURCESPECIAL, "LightSourceSpecial", N_("Light Source Special"), ""},
00182 {MNOTE_SANYO_TAG_RESAVED, "Resaved", N_("Resaved"), ""},
00183 {MNOTE_SANYO_TAG_CCDSENSITIVITY, "CCDSensitivity", N_("CCD Sensitivity"), ""},
00184 {MNOTE_SANYO_TAG_SCENESELECT, "SceneSelect", N_("Scene Select"), ""},
00185 {MNOTE_SANYO_TAG_MANUALFOCUSDISTANCE, "ManualFocusDistance", N_("Manual Focus Distance"), ""},
00186 {MNOTE_SANYO_TAG_SEQUENCESHOTINTERVAL, "SequenceShotInterval", N_("Sequence Shot Interval"), ""},
00187
00188
00189 {MNOTE_EPSON_TAG_IMAGE_WIDTH, "EpsonImageWidth", N_("Epson Image Width"), ""},
00190 {MNOTE_EPSON_TAG_IMAGE_HEIGHT, "EpsonImageHeight", N_("Epson Image Height"), ""},
00191 {MNOTE_EPSON_TAG_SOFTWARE, "EpsonSoftware", N_("Epson Software Version"), ""},
00192 #endif
00193 {0, NULL, NULL, NULL}
00194 };
00195
00196 const char *
00197 mnote_olympus_tag_get_name (MnoteOlympusTag t)
00198 {
00199 unsigned int i;
00200
00201 for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
00202 if (table[i].tag == t) return (table[i].name);
00203 return NULL;
00204 }
00205
00206 const char *
00207 mnote_olympus_tag_get_title (MnoteOlympusTag t)
00208 {
00209 unsigned int i;
00210
00211 bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
00212 for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
00213 if (table[i].tag == t) return (_(table[i].title));
00214 return NULL;
00215 }
00216
00217 const char *
00218 mnote_olympus_tag_get_description (MnoteOlympusTag t)
00219 {
00220 unsigned int i;
00221
00222 for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
00223 if (table[i].tag == t) {
00224 if (!table[i].description || !*table[i].description)
00225 return "";
00226 bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
00227 return _(table[i].description);
00228 }
00229 return NULL;
00230 }