1 /* Copyright (C) 2005-2011 Fabio Riccardi */ 2 /* Copyright (C) 2017- Masahiro Kitagawa */ 3 4 package com.lightcrafts.image.metadata.makernotes; 5 6 import java.awt.image.RenderedImage; 7 import java.io.IOException; 8 import java.util.HashMap; 9 import java.util.Map; 10 import java.util.ResourceBundle; 11 12 import com.lightcrafts.image.BadImageFileException; 13 import com.lightcrafts.image.ImageInfo; 14 import com.lightcrafts.image.metadata.*; 15 import com.lightcrafts.image.metadata.providers.FlashProvider; 16 import com.lightcrafts.image.metadata.providers.ISOProvider; 17 import com.lightcrafts.image.metadata.providers.LensProvider; 18 import com.lightcrafts.image.metadata.providers.PreviewImageProvider; 19 import com.lightcrafts.image.metadata.values.*; 20 import com.lightcrafts.image.types.ORFImageType; 21 import com.lightcrafts.image.UnknownImageTypeException; 22 import com.lightcrafts.utils.bytebuffer.LCByteBuffer; 23 import com.lightcrafts.utils.TextUtil; 24 25 import static com.lightcrafts.image.metadata.ImageMetaType.*; 26 import static com.lightcrafts.image.metadata.makernotes.OlympusConstants.*; 27 import static com.lightcrafts.image.metadata.makernotes.OlympusTags.*; 28 29 /** 30 * An {@code OlympusDirectory} is-an {@link ImageMetadataDirectory} for 31 * holding Olympus-specific maker-note metadata. 32 * 33 * @author Paul J. Lucas [paul@lightcrafts.com] 34 */ 35 public final class OlympusDirectory extends MakerNotesDirectory implements 36 FlashProvider, ISOProvider, LensProvider, PreviewImageProvider { 37 38 ////////// public ///////////////////////////////////////////////////////// 39 40 /** 41 * Gets the state of the flash at the time the image was captured. The 42 * value returned is the value of {@link TIFFTags#TIFF_FLASH TIFF_FLASH}. 43 * <p> 44 * Note that Olympus cameras don't seem to say whether the flash actually 45 * fired. 46 * 47 * @return Returns the flash state or -1 if it's unavailable. 48 */ 49 @Override getFlash()50 public int getFlash() { 51 int flashBits = FLASH_NOT_PRESENT_BIT; 52 53 ImageMetaValue flashValue = getValue( OLYMPUS_FLASH_DEVICE ); 54 if ( flashValue != null && flashValue.getIntValue() > 0 ) 55 flashBits &= ~FLASH_NOT_PRESENT_BIT; 56 57 flashValue = getValue( OLYMPUS_E_FLASH_TYPE ); 58 if ( flashValue != null && flashValue.getIntValue() > 0 ) 59 flashBits &= ~FLASH_NOT_PRESENT_BIT; 60 61 flashValue = getValue( OLYMPUS_CS_FLASH_MODE ); 62 if ( flashValue != null ) { 63 flashBits &= ~FLASH_NOT_PRESENT_BIT; 64 final int olympusFlashBits = flashValue.getIntValue(); 65 if ( (olympusFlashBits & OLYMPUS_FLASH_COMPULSORY_BIT) != 0 ) 66 flashBits |= 1 << 3; 67 if ( (olympusFlashBits & OLYMPUS_FLASH_RED_EYE_BIT) != 0 ) 68 flashBits |= FLASH_RED_EYE_BIT; 69 } 70 return flashBits != FLASH_NOT_PRESENT_BIT ? flashBits : -1; 71 } 72 73 /** 74 * {@inheritDoc} 75 */ 76 @Override getISO()77 public int getISO() { 78 final ImageMetaValue value = getValue(OLYMPUS_ISO); 79 if (value == null || hasTagValueLabelFor(value) != null) { 80 return 0; 81 } 82 return value.getIntValue(); 83 } 84 85 /** 86 * {@inheritDoc} 87 */ 88 @Override getLens()89 public String getLens() { 90 final String label = hasTagValueLabelFor(OLYMPUS_E_LENS_TYPE); 91 if (label != null) { 92 return label; 93 } 94 return makeLensLabelFrom( 95 getValue(OLYMPUS_E_MIN_FOCAL_LENGTH), 96 getValue(OLYMPUS_E_MIN_FOCAL_LENGTH), 97 null 98 ); 99 } 100 101 /** 102 * Gets the maker-notes adjustments for Olympus. 103 * 104 * @param buf The {@link LCByteBuffer} the metadata is in. 105 * @param offset The offset to the start of the maker-notes. 106 * @return Returns said adjustments. 107 */ 108 @Override getMakerNotesAdjustments( LCByteBuffer buf, int offset )109 public int[] getMakerNotesAdjustments( LCByteBuffer buf, int offset ) 110 throws IOException 111 { 112 if ( buf.getEquals( offset, "OLYMPUS", "ASCII" ) ) 113 return new int[]{ 12, offset }; 114 if ( buf.getEquals( offset, "OLYMP", "ASCII" ) ) 115 return new int[]{ 8, offset }; 116 throw new IOException( "unknown maker notes header" ); 117 } 118 119 /** 120 * Gets the name of this directory. 121 * 122 * @return Always returns "Olympus". 123 */ 124 @Override getName()125 public String getName() { 126 return "Olympus"; 127 } 128 129 /** 130 * {@inheritDoc} 131 */ 132 @Override getPreviewImage( ImageInfo imageInfo, int maxWidth, int maxHeight )133 public RenderedImage getPreviewImage( ImageInfo imageInfo, int maxWidth, 134 int maxHeight ) 135 throws BadImageFileException, IOException, UnknownImageTypeException 136 { 137 return ORFImageType.INSTANCE.getPreviewImage( 138 imageInfo, maxWidth, maxHeight 139 ); 140 } 141 142 /** 143 * {@inheritDoc} 144 */ 145 @Override getTagInfoFor( Integer id )146 public ImageMetaTagInfo getTagInfoFor( Integer id ) { 147 return m_tagsByID.get( id ); 148 } 149 150 /** 151 * {@inheritDoc} 152 */ 153 @Override getTagInfoFor( String name )154 public ImageMetaTagInfo getTagInfoFor( String name ) { 155 return m_tagsByName.get( name ); 156 } 157 158 /** 159 * Puts a key/value pair into this directory. For a Olympus tag that has 160 * subfields, expands the values into multiple key/value pairs. 161 * 162 * @param tagID The metadata tag ID (the key). 163 * @param value The value to put. 164 * @see #valueToString(ImageMetaValue) 165 */ 166 @Override putValue( Integer tagID, ImageMetaValue value )167 public void putValue( Integer tagID, ImageMetaValue value ) { 168 switch ( tagID ) { 169 case OLYMPUS_CS_NOISE_FILTER: 170 value = new ShortMetaValue( value.getIntValue() ); 171 break; 172 case OLYMPUS_E_EXTENDER_TYPE: 173 if ( value.getValueCount() == 6 ) { 174 final int make = value.getIntValueAt( 0 ); 175 final int model = value.getIntValueAt( 2 ); 176 final int id = make * 100 + model; 177 value = new UnsignedLongMetaValue( id ); 178 } 179 break; 180 case OLYMPUS_E_LENS_TYPE: 181 if ( value.getValueCount() == 6 ) { 182 final int make = value.getIntValueAt( 0 ); 183 final int model = value.getIntValueAt( 2 ); 184 final int submodel = value.getIntValueAt( 3 ); 185 final int id = make * 10000 + model * 100 + submodel; 186 value = new LongMetaValue( id ); 187 } 188 break; 189 case OLYMPUS_MINOLTA_CAMERA_SETTINGS: 190 case OLYMPUS_MINOLTA_CAMERA_SETTINGS_OLD: 191 explodeSubfields( tagID, 0, value, true ); 192 break; 193 case OLYMPUS_ISO: { 194 final float n = value.getFloatValue(); 195 value = new UnsignedShortMetaValue( 196 (int)(100 * Math.pow( 2, n - 5 )) 197 ); 198 break; 199 } 200 case OLYMPUS_WHITE_BALANCE_MODE: 201 final long[] v = ((LongMetaValue)value).getLongValues(); 202 final int n; 203 switch ( v.length ) { 204 case 1: 205 n = (int)v[0]; 206 break; 207 case 2: 208 n = (int)(v[0] * 10 + v[1]); 209 break; 210 default: 211 return; 212 } 213 value = new UnsignedShortMetaValue( n ); 214 break; 215 } 216 super.putValue( tagID, value ); 217 } 218 219 /** 220 * {@inheritDoc} 221 */ 222 @Override valueToString( ImageMetaValue value )223 public String valueToString( ImageMetaValue value ) { 224 switch ( value.getOwningTagID() ) { 225 case OLYMPUS_BLUE_BALANCE: 226 case OLYMPUS_RED_BALANCE: 227 return TextUtil.tenths( value.getIntValue() / 256.0 ); 228 case OLYMPUS_CS_MANOMETER_PRESSURE: 229 return TextUtil.tenths( value.getIntValue() / 10.0 ) + " kPa"; 230 case OLYMPUS_E_FOCAL_PLANE_DIAGONAL: 231 return TextUtil.tenths( value.getDoubleValue() ) + "mm"; 232 case OLYMPUS_E_MAX_APERTURE_AT_CUR_FOCAL: 233 case OLYMPUS_E_MAX_APERTURE_AT_MAX_FOCAL: 234 case OLYMPUS_E_MAX_APERTURE_AT_MIN_FOCAL: { 235 final int n = value.getIntValue(); 236 final double d = Math.pow( Math.sqrt(2), n / 256.0 ); 237 return "F/" + TextUtil.tenths( d ); 238 } 239 case OLYMPUS_E_MAX_FOCAL_LENGTH: 240 case OLYMPUS_E_MIN_FOCAL_LENGTH: 241 return value.getStringValue() + "mm"; 242 case OLYMPUS_MCS_CUSTOM_SATURATION: { 243 final String model = getOwningMetadata().getCameraMake( true ); 244 if ( model != null && model.contains( "E-1" ) ) { 245 final long[] n = ((LongMetaValue)value).getLongValues(); 246 n[0] -= n[1]; 247 n[2] -= n[1]; 248 return n[0] + " (0," + n[2] + ')'; 249 } 250 // no break; 251 } 252 case OLYMPUS_MCS_CONTRAST_SETTING: 253 case OLYMPUS_MCS_PM_CONTRAST: 254 case OLYMPUS_MCS_PM_SATURATION: 255 case OLYMPUS_MCS_PM_SHARPNESS: 256 case OLYMPUS_MCS_SHARPNESS_SETTING: { 257 final String[] values = value.getValues(); 258 if ( values.length != 3 ) 259 return null; 260 return values[0] + " (" + values[1] + ',' + values[2] + ')'; 261 } 262 case OLYMPUS_MCS_PANORAMA_MODE: { 263 if ( value.getValueCount() != 2 ) 264 break; 265 final int tagID = value.getOwningTagID(); 266 return getTagValueLabelFor( tagID, value.getIntValue() ) 267 + ", " + value.getValues()[1]; 268 } 269 case OLYMPUS_FOCAL_PLANE_DIAGONAL: 270 return value.getStringValue() + "mm"; // TODO: localize 271 } 272 return super.valueToString( value ); 273 } 274 275 ////////// protected ////////////////////////////////////////////////////// 276 277 /** 278 * {@inheritDoc} 279 */ 280 @Override getLongFocalValue()281 protected ImageMetaValue getLongFocalValue() { 282 return getValue( OLYMPUS_E_MAX_FOCAL_LENGTH ); 283 } 284 285 /** 286 * {@inheritDoc} 287 */ 288 @Override getShortFocalValue()289 protected ImageMetaValue getShortFocalValue() { 290 return getValue( OLYMPUS_E_MIN_FOCAL_LENGTH ); 291 } 292 293 /** 294 * {@inheritDoc} 295 */ 296 @Override getMaxApertureValue()297 protected ImageMetaValue getMaxApertureValue() { 298 return getValue( OLYMPUS_E_MAX_APERTURE_AT_MAX_FOCAL ); 299 } 300 301 /** 302 * Get the {@link ResourceBundle} to use for tags. 303 * 304 * @return Returns said {@link ResourceBundle}. 305 */ 306 @Override getTagLabelBundle()307 protected ResourceBundle getTagLabelBundle() { 308 return m_tagBundle; 309 } 310 311 /** 312 * {@inheritDoc} 313 */ 314 @Override getTagsInterface()315 protected Class<? extends ImageMetaTags> getTagsInterface() { 316 return OlympusTags.class; 317 } 318 319 ////////// private //////////////////////////////////////////////////////// 320 321 /** 322 * Add the tag mappings. 323 * 324 * @param id The tag's ID. 325 * @param name The tag's name. 326 * @param type The tag's {@link ImageMetaType}. 327 */ add( int id, String name, ImageMetaType type )328 private static void add( int id, String name, ImageMetaType type ) { 329 final ImageMetaTagInfo tagInfo = 330 new ImageMetaTagInfo( id, name, type, false ); 331 m_tagsByID.put( id, tagInfo ); 332 m_tagsByName.put( name, tagInfo ); 333 } 334 335 /** 336 * This is where the actual labels for the tags are. 337 */ 338 private static final ResourceBundle m_tagBundle = ResourceBundle.getBundle( 339 "com.lightcrafts.image.metadata.makernotes.OlympusTags" 340 ); 341 342 /** 343 * A mapping of tags by ID. 344 */ 345 private static final Map<Integer,ImageMetaTagInfo> m_tagsByID = 346 new HashMap<Integer,ImageMetaTagInfo>(); 347 348 /** 349 * A mapping of tags by name. 350 */ 351 private static final Map<String,ImageMetaTagInfo> m_tagsByName = 352 new HashMap<String,ImageMetaTagInfo>(); 353 354 static { add( OLYMPUS_APERTURE, R, META_SRATIONAL )355 add( OLYMPUS_APERTURE, "Aperture", META_SRATIONAL ); add( OLYMPUS_AUTO_FOCUS_RESULT, R, META_USHORT )356 add( OLYMPUS_AUTO_FOCUS_RESULT, "AutoFocusResult", META_USHORT ); add( OLYMPUS_BLACK_AND_WHITE_MODE, R, META_USHORT )357 add( OLYMPUS_BLACK_AND_WHITE_MODE, "BlackAndWhiteMode", META_USHORT ); add( OLYMPUS_BLACK_LEVEL, R, META_USHORT )358 add( OLYMPUS_BLACK_LEVEL, "BlackLevel", META_USHORT ); add( OLYMPUS_BLUE_BALANCE, R, META_USHORT )359 add( OLYMPUS_BLUE_BALANCE, "BlueBalance", META_USHORT ); add( OLYMPUS_BODY_FIRMWARE_VERSION, R, META_STRING )360 add( OLYMPUS_BODY_FIRMWARE_VERSION, "BodyFirmwareVersion", META_STRING ); add( OLYMPUS_BRIGHTNESS, R, META_SRATIONAL )361 add( OLYMPUS_BRIGHTNESS, "Brightness", META_SRATIONAL ); add( OLYMPUS_CAMERA_ID, R, META_UNKNOWN )362 add( OLYMPUS_CAMERA_ID, "CameraID", META_UNKNOWN ); add( OLYMPUS_CAMERA_SETTINGS, R, META_UNDEFINED )363 add( OLYMPUS_CAMERA_SETTINGS, "CameraSettings", META_UNDEFINED ); add( OLYMPUS_CAMERA_TYPE, R, META_UNKNOWN )364 add( OLYMPUS_CAMERA_TYPE, "CameraType", META_UNKNOWN ); add( OLYMPUS_CCD_SCAN_MODE, R, META_USHORT )365 add( OLYMPUS_CCD_SCAN_MODE, "CCDScanMode", META_USHORT ); add( OLYMPUS_COLOR_MATRIX_NUMBER, R, META_USHORT )366 add( OLYMPUS_COLOR_MATRIX_NUMBER, "ColorMatrixNumber", META_USHORT ); add( OLYMPUS_COLOR_MODE, R, META_ULONG )367 add( OLYMPUS_COLOR_MODE, "ColorMode", META_ULONG ); add( OLYMPUS_COMPRESSED_IMAGE_SIZE, R, META_ULONG )368 add( OLYMPUS_COMPRESSED_IMAGE_SIZE, "CompressedImageSize", META_ULONG ); add( OLYMPUS_COMPRESSION_RATIO, R, META_URATIONAL )369 add( OLYMPUS_COMPRESSION_RATIO, "CompressionRatio", META_URATIONAL ); add( OLYMPUS_CONTRAST, R, META_USHORT )370 add( OLYMPUS_CONTRAST, "Contrast", META_USHORT ); add( OLYMPUS_CORING_FILTER, R, META_USHORT )371 add( OLYMPUS_CORING_FILTER, "CoringFilter", META_USHORT ); add( OLYMPUS_CS_AE_LOCK, R, META_USHORT )372 add( OLYMPUS_CS_AE_LOCK, "CSAELock", META_USHORT ); add( OLYMPUS_CS_AF_AREAS, R, META_ULONG )373 add( OLYMPUS_CS_AF_AREAS, "CSAFAreas", META_ULONG ); add( OLYMPUS_CS_AF_POINT_SELECTED, R, META_SRATIONAL )374 add( OLYMPUS_CS_AF_POINT_SELECTED, "CSAFPointSelected", META_SRATIONAL ); add( OLYMPUS_CS_AF_SEARCH, R, META_USHORT )375 add( OLYMPUS_CS_AF_SEARCH, "CSAFSearch", META_USHORT ); add( OLYMPUS_CS_ART_FILTER, R, META_USHORT )376 add( OLYMPUS_CS_ART_FILTER, "CSArtFilter", META_USHORT ); add( OLYMPUS_CS_COLOR_SPACE, R, META_USHORT )377 add( OLYMPUS_CS_COLOR_SPACE, "CSColorSpace", META_USHORT ); add( OLYMPUS_CS_COMPRESSION_FACTOR, R, META_URATIONAL )378 add( OLYMPUS_CS_COMPRESSION_FACTOR, "CSCompressionFactor", META_URATIONAL ); add( OLYMPUS_CS_CONTRAST_SETTING, R, META_SSHORT )379 add( OLYMPUS_CS_CONTRAST_SETTING, "CSContrastSetting", META_SSHORT ); add( OLYMPUS_CS_CUSTOM_SATURATION, R, META_SSHORT )380 add( OLYMPUS_CS_CUSTOM_SATURATION, "CScustomSaturation", META_SSHORT ); add( OLYMPUS_CS_DISTORTION_CORRECTION, R, META_USHORT )381 add( OLYMPUS_CS_DISTORTION_CORRECTION, "CSDistortionCorrection", META_USHORT ); add( OLYMPUS_CS_DRIVE_MODE, R, META_USHORT )382 add( OLYMPUS_CS_DRIVE_MODE, "CSDriveMode", META_USHORT ); add( OLYMPUS_CS_EXPOSURE_MODE, R, META_USHORT )383 add( OLYMPUS_CS_EXPOSURE_MODE, "CSExposureMode", META_USHORT ); add( OLYMPUS_CS_EXPOSURE_SHIFT, R, META_SRATIONAL )384 add( OLYMPUS_CS_EXPOSURE_SHIFT, "CSExposureShift", META_SRATIONAL ); add( OLYMPUS_CS_EXTENDED_WB_DETECT, R, META_USHORT )385 add( OLYMPUS_CS_EXTENDED_WB_DETECT, "CSExtendedWBDetect", META_USHORT ); add( OLYMPUS_CS_FLASH_CONTROL_MODE, R, META_USHORT )386 add( OLYMPUS_CS_FLASH_CONTROL_MODE, "CSFlashControlMode", META_USHORT ); add( OLYMPUS_CS_FLASH_EXPOSURE_COMP, R, META_SRATIONAL )387 add( OLYMPUS_CS_FLASH_EXPOSURE_COMP, "CSFLashExposureComp", META_SRATIONAL ); add( OLYMPUS_CS_FLASH_INTENSITY, R, META_SRATIONAL )388 add( OLYMPUS_CS_FLASH_INTENSITY, "CSFlashIntensity", META_SRATIONAL ); add( OLYMPUS_CS_FLASH_MODE, R, META_USHORT )389 add( OLYMPUS_CS_FLASH_MODE, "CSFlashMode", META_USHORT ); add( OLYMPUS_CS_FLASH_REMOTE_CONTROL, R, META_USHORT )390 add( OLYMPUS_CS_FLASH_REMOTE_CONTROL, "CSFlashRemoteControl", META_USHORT ); add( OLYMPUS_CS_FOCUS_MODE, R, META_USHORT )391 add( OLYMPUS_CS_FOCUS_MODE, "CSFocusMode", META_USHORT ); add( OLYMPUS_CS_FOCUS_PROCESS, R, META_USHORT )392 add( OLYMPUS_CS_FOCUS_PROCESS, "CSfocusProcess", META_USHORT ); add( OLYMPUS_CS_GRADATION, R, META_SSHORT )393 add( OLYMPUS_CS_GRADATION, "CSGradation", META_SSHORT ); add( OLYMPUS_CS_IMAGE_QUALITY_2, R, META_USHORT )394 add( OLYMPUS_CS_IMAGE_QUALITY_2, "CSImageQuality2", META_USHORT ); add( OLYMPUS_CS_IMAGE_STABILIZATION, R, META_ULONG )395 add( OLYMPUS_CS_IMAGE_STABILIZATION, "CSImageStabilization", META_ULONG ); add( OLYMPUS_CS_LEVEL_GAUGE_PITCH, R, META_USHORT )396 add( OLYMPUS_CS_LEVEL_GAUGE_PITCH, "CSLevelGaugePitch", META_USHORT ); add( OLYMPUS_CS_LEVEL_GAUGE_ROLL, R, META_USHORT )397 add( OLYMPUS_CS_LEVEL_GAUGE_ROLL, "CSLevelGaugeRoll", META_USHORT ); add( OLYMPUS_CS_MACRO_MODE, R, META_USHORT )398 add( OLYMPUS_CS_MACRO_MODE, "CSMacroMode", META_USHORT ); add( OLYMPUS_CS_MANOMETER_PRESSURE, R, META_USHORT )399 add( OLYMPUS_CS_MANOMETER_PRESSURE, "CSManometerPressure", META_USHORT ); add( OLYMPUS_CS_MANUAL_FLASH_STRENGTH, R, META_USHORT )400 add( OLYMPUS_CS_MANUAL_FLASH_STRENGTH, "CSManualFlashStrength", META_USHORT ); add( OLYMPUS_CS_METERING_MODE, R, META_USHORT )401 add( OLYMPUS_CS_METERING_MODE, "CSMeteringMode", META_USHORT ); add( OLYMPUS_CS_MODIFIED_SATURATION, R, META_USHORT )402 add( OLYMPUS_CS_MODIFIED_SATURATION, "CSModifiedSaturation", META_USHORT ); add( OLYMPUS_CS_NOISE_FILTER, R, META_SSHORT )403 add( OLYMPUS_CS_NOISE_FILTER, "CSNoiseFilter", META_SSHORT ); add( OLYMPUS_CS_NOISE_REDUCTION, R, META_USHORT )404 add( OLYMPUS_CS_NOISE_REDUCTION, "CSNoiseReduction", META_USHORT ); add( OLYMPUS_CS_PANORAMA_MODE, R, META_USHORT )405 add( OLYMPUS_CS_PANORAMA_MODE, "CSPanoramaMode", META_USHORT ); add( OLYMPUS_CS_PICTURE_MODE, R, META_USHORT )406 add( OLYMPUS_CS_PICTURE_MODE, "CSPictureMode", META_USHORT ); add( OLYMPUS_CS_PM_BW_FILTER, R, META_SSHORT )407 add( OLYMPUS_CS_PM_BW_FILTER, "CSPMBWFilter", META_SSHORT ); add( OLYMPUS_CS_PM_CONTRAST, R, META_SSHORT )408 add( OLYMPUS_CS_PM_CONTRAST, "CSPMContrasT", META_SSHORT ); add( OLYMPUS_CS_PM_HUE, R, META_SSHORT )409 add( OLYMPUS_CS_PM_HUE, "CSPMHue", META_SSHORT ); add( OLYMPUS_CS_PM_SATURATION, R, META_SSHORT )410 add( OLYMPUS_CS_PM_SATURATION, "CSPMSaturation", META_SSHORT ); add( OLYMPUS_CS_PM_SHARPNESS, R, META_SSHORT )411 add( OLYMPUS_CS_PM_SHARPNESS, "CSPMSharpness", META_SSHORT ); add( OLYMPUS_CS_PM_TONE, R, META_SSHORT )412 add( OLYMPUS_CS_PM_TONE, "CSPMTone", META_SSHORT ); add( OLYMPUS_CS_PREVIEW_IMAGE_LENGTH, R, META_ULONG )413 add( OLYMPUS_CS_PREVIEW_IMAGE_LENGTH, "CSPreviewImageLength", META_ULONG ); add( OLYMPUS_CS_PREVIEW_IMAGE_START, R, META_ULONG )414 add( OLYMPUS_CS_PREVIEW_IMAGE_START, "CSPreviewImageStart", META_ULONG ); add( OLYMPUS_CS_PREVIEW_IMAGE_VALID, R, META_ULONG )415 add( OLYMPUS_CS_PREVIEW_IMAGE_VALID, "CSPreviewImageValid", META_ULONG ); add( OLYMPUS_CS_SCENE_MODE, R, META_USHORT )416 add( OLYMPUS_CS_SCENE_MODE, "CSSceneMode", META_USHORT ); add( OLYMPUS_CS_SHADING_COMPENSATION, R, META_USHORT )417 add( OLYMPUS_CS_SHADING_COMPENSATION, "CSShadingCompensation", META_USHORT ); add( OLYMPUS_CS_SHARPNESS_SETTING, R, META_SSHORT )418 add( OLYMPUS_CS_SHARPNESS_SETTING, "CSSharpnessSetting", META_SSHORT ); add( OLYMPUS_CS_VERSION, R, META_UNDEFINED )419 add( OLYMPUS_CS_VERSION, "CSVersion", META_UNDEFINED ); add( OLYMPUS_CS_WHITE_BALANCE_2, R, META_USHORT )420 add( OLYMPUS_CS_WHITE_BALANCE_2, "CSWhiteBalance2", META_USHORT ); add( OLYMPUS_CS_WHITE_BALANCE_TEMP, R, META_USHORT )421 add( OLYMPUS_CS_WHITE_BALANCE_TEMP, "CSWhiteBalanceTemp", META_USHORT ); add( OLYMPUS_DIGITAL_ZOOM, R, META_URATIONAL )422 add( OLYMPUS_DIGITAL_ZOOM, "DigitalZoom", META_URATIONAL ); add( OLYMPUS_E_EXTENDER_FIRMWARE_VERSION, R, META_ULONG )423 add( OLYMPUS_E_EXTENDER_FIRMWARE_VERSION, "EExtenderFirmwareVersion", META_ULONG ); add( OLYMPUS_E_EXTENDER_MODEL, R, META_STRING )424 add( OLYMPUS_E_EXTENDER_MODEL, "EExtenderModel", META_STRING ); add( OLYMPUS_E_EXTENDER_SERIAL_NUMBER, R, META_STRING )425 add( OLYMPUS_E_EXTENDER_SERIAL_NUMBER, "EExtenderSerialNumber", META_STRING ); add( OLYMPUS_E_EXTENDER_TYPE, R, META_UBYTE )426 add( OLYMPUS_E_EXTENDER_TYPE, "EExtenderType", META_UBYTE ); add( OLYMPUS_E_FLASH_FIRMWARE_VERSION, R, META_ULONG )427 add( OLYMPUS_E_FLASH_FIRMWARE_VERSION, "EFlashFirmwareVersion", META_ULONG ); add( OLYMPUS_E_FLASH_MODEL, R, META_USHORT )428 add( OLYMPUS_E_FLASH_MODEL, "EFlashModel", META_USHORT ); add( OLYMPUS_E_FLASH_SERIAL_NUMBER, R, META_STRING )429 add( OLYMPUS_E_FLASH_SERIAL_NUMBER, "EFlashSerialNumber", META_STRING ); add( OLYMPUS_E_FLASH_TYPE, R, META_USHORT )430 add( OLYMPUS_E_FLASH_TYPE, "EFlashType", META_USHORT ); add( OLYMPUS_E_FOCAL_PLANE_DIAGONAL, R, META_URATIONAL )431 add( OLYMPUS_E_FOCAL_PLANE_DIAGONAL, "EFocalPlaneDiagonal", META_URATIONAL ); add( OLYMPUS_E_INTERNAL_SERIAL_NUMBER, R, META_STRING )432 add( OLYMPUS_E_INTERNAL_SERIAL_NUMBER, "EInternalSerialNumber", META_STRING ); add( OLYMPUS_E_LENS_FIRMWARE_VERSION, R, META_ULONG )433 add( OLYMPUS_E_LENS_FIRMWARE_VERSION, "ELensFirmwareVersion", META_ULONG ); add( OLYMPUS_E_LENS_PROPERTIES, R, META_USHORT )434 add( OLYMPUS_E_LENS_PROPERTIES, "ELensProperties", META_USHORT ); add( OLYMPUS_E_LENS_SERIAL_NUMBER, R, META_STRING )435 add( OLYMPUS_E_LENS_SERIAL_NUMBER, "ELensSerialNumber", META_STRING ); add( OLYMPUS_E_LENS_TYPE, R, META_UBYTE )436 add( OLYMPUS_E_LENS_TYPE, "ELensType", META_UBYTE ); add( OLYMPUS_E_MAX_APERTURE_AT_CUR_FOCAL, R, META_USHORT )437 add( OLYMPUS_E_MAX_APERTURE_AT_CUR_FOCAL, "EMaxApertureAtCurFocal", META_USHORT ); add( OLYMPUS_E_MAX_APERTURE_AT_MAX_FOCAL, R, META_USHORT )438 add( OLYMPUS_E_MAX_APERTURE_AT_MAX_FOCAL, "EMaxApertureAtMaxFocal", META_USHORT ); add( OLYMPUS_E_MAX_APERTURE_AT_MIN_FOCAL, R, META_USHORT )439 add( OLYMPUS_E_MAX_APERTURE_AT_MIN_FOCAL, "EMaxApertureAtMinFocal", META_USHORT ); add( OLYMPUS_E_MAX_FOCAL_LENGTH, R, META_USHORT )440 add( OLYMPUS_E_MAX_FOCAL_LENGTH, "EMaxFocalLength", META_USHORT ); add( OLYMPUS_E_MIN_FOCAL_LENGTH, R, META_USHORT )441 add( OLYMPUS_E_MIN_FOCAL_LENGTH, "EMinFocalLength", META_USHORT ); add( OLYMPUS_EPSON_IMAGE_HEIGHT, R, META_USHORT )442 add( OLYMPUS_EPSON_IMAGE_HEIGHT, "EpsonImageHeight", META_USHORT ); add( OLYMPUS_EPSON_IMAGE_WIDTH, R, META_USHORT )443 add( OLYMPUS_EPSON_IMAGE_WIDTH, "EpsonImageWidth", META_USHORT ); add( OLYMPUS_EPSON_SOFTWARE, R, META_STRING )444 add( OLYMPUS_EPSON_SOFTWARE, "EpsonSoftware", META_STRING ); add( OLYMPUS_E_SERIAL_NUMBER, R, META_STRING )445 add( OLYMPUS_E_SERIAL_NUMBER, "ESerialNumber", META_STRING ); add( OLYMPUS_E_VERSION, R, META_UNDEFINED )446 add( OLYMPUS_E_VERSION, "EVersion", META_UNDEFINED ); add( OLYMPUS_EXPOSURE_COMPENSATION, R, META_SRATIONAL )447 add( OLYMPUS_EXPOSURE_COMPENSATION, "ExposureCompensation", META_SRATIONAL ); add( OLYMPUS_EXTERNAL_FLASH_BOUNCE, R, META_USHORT )448 add( OLYMPUS_EXTERNAL_FLASH_BOUNCE, "ExternalFlashBounce", META_USHORT ); add( OLYMPUS_EXTERNAL_FLASH_MODE, R, META_USHORT )449 add( OLYMPUS_EXTERNAL_FLASH_MODE, "ExternalFlashMode", META_USHORT ); add( OLYMPUS_EXTERNAL_FLASH_ZOOM, R, META_USHORT )450 add( OLYMPUS_EXTERNAL_FLASH_ZOOM, "ExternalFlashZoom", META_USHORT ); add( OLYMPUS_FIRMWARE, R, META_STRING )451 add( OLYMPUS_FIRMWARE, "Firmware", META_STRING ); add( OLYMPUS_FLASH_CHARGE_LEVEL, R, META_USHORT )452 add( OLYMPUS_FLASH_CHARGE_LEVEL, "FlashChargeLevel", META_USHORT ); add( OLYMPUS_FLASH_DEVICE, R, META_USHORT )453 add( OLYMPUS_FLASH_DEVICE, "FlashDevice", META_USHORT ); add( OLYMPUS_FLASH_EXPOSURE_COMPENSATION, R, META_SRATIONAL )454 add( OLYMPUS_FLASH_EXPOSURE_COMPENSATION, "FlashExposureCompensation", META_SRATIONAL ); add( OLYMPUS_FLASH_MODE, R, META_USHORT )455 add( OLYMPUS_FLASH_MODE, "FlashMode", META_USHORT ); add( OLYMPUS_FOCAL_PLANE_DIAGONAL, R, META_URATIONAL )456 add( OLYMPUS_FOCAL_PLANE_DIAGONAL, "FocalPlaneDiagonal", META_URATIONAL ); add( OLYMPUS_FOCUS_MODE, R, META_USHORT )457 add( OLYMPUS_FOCUS_MODE, "FocusMode", META_USHORT ); add( OLYMPUS_FOCUS_RANGE, R, META_USHORT )458 add( OLYMPUS_FOCUS_RANGE, "FocusRange", META_USHORT ); add( OLYMPUS_FOCUS_STEP_COUNT, R, META_USHORT )459 add( OLYMPUS_FOCUS_STEP_COUNT, "FocusStepCount", META_USHORT ); add( OLYMPUS_IMAGE_HEIGHT, R, META_ULONG )460 add( OLYMPUS_IMAGE_HEIGHT, "ImageHeight", META_ULONG ); add( OLYMPUS_IMAGE_SIZE, R, META_ULONG )461 add( OLYMPUS_IMAGE_SIZE, "ImageSize", META_ULONG ); add( OLYMPUS_IMAGE_WIDTH, R, META_ULONG )462 add( OLYMPUS_IMAGE_WIDTH, "ImageWidth", META_ULONG ); add( OLYMPUS_INFINITY_LENS_STEP, R, META_USHORT )463 add( OLYMPUS_INFINITY_LENS_STEP, "InfinityLensStep", META_USHORT ); add( OLYMPUS_ISO, R, META_SRATIONAL )464 add( OLYMPUS_ISO, "ISO", META_SRATIONAL ); add( OLYMPUS_LENS_DISTORTION_PARAMS, R, META_SSHORT )465 add( OLYMPUS_LENS_DISTORTION_PARAMS, "LensDistortionParams", META_SSHORT ); add( OLYMPUS_LENS_TEMPERATURE, R, META_SSHORT )466 add( OLYMPUS_LENS_TEMPERATURE, "LensTemperature", META_SSHORT ); add( OLYMPUS_LIGHT_CONDITION, R, META_USHORT )467 add( OLYMPUS_LIGHT_CONDITION, "LightCondition", META_USHORT ); add( OLYMPUS_LIGHT_VALUE_CENTER, R, META_SRATIONAL )468 add( OLYMPUS_LIGHT_VALUE_CENTER, "LightValueCenter", META_SRATIONAL ); add( OLYMPUS_LIGHT_VALUE_PERIPHERY, R, META_SRATIONAL )469 add( OLYMPUS_LIGHT_VALUE_PERIPHERY, "LightValuePeriphery", META_SRATIONAL ); add( OLYMPUS_MACRO_MODE, R, META_USHORT )470 add( OLYMPUS_MACRO_MODE, "MacroMode", META_USHORT ); add( OLYMPUS_MAKER_NOTES_VERSION, R, META_UNDEFINED )471 add( OLYMPUS_MAKER_NOTES_VERSION, "MakerNotesVersion", META_UNDEFINED ); add( OLYMPUS_MANUAL_FOCUS_DISTANCE, R, META_URATIONAL )472 add( OLYMPUS_MANUAL_FOCUS_DISTANCE, "ManualFocusDistance", META_URATIONAL ); add( OLYMPUS_MCS_AE_LOCK, R, META_USHORT )473 add( OLYMPUS_MCS_AE_LOCK, "MCSAELock", META_USHORT ); add( OLYMPUS_MCS_AF_AREAS, R, META_ULONG )474 add( OLYMPUS_MCS_AF_AREAS, "MCSAFAreas", META_ULONG ); add( OLYMPUS_MCS_AF_SEARCH, R, META_USHORT )475 add( OLYMPUS_MCS_AF_SEARCH, "MCSAFSearch", META_USHORT ); add( OLYMPUS_MCS_COLORSPACE, R, META_USHORT )476 add( OLYMPUS_MCS_COLORSPACE, "MCSColorspace", META_USHORT ); add( OLYMPUS_MCS_COMPRESSION_FACTOR, R, META_URATIONAL )477 add( OLYMPUS_MCS_COMPRESSION_FACTOR, "MCSCompressionFactor", META_URATIONAL ); add( OLYMPUS_MCS_CONTRAST_SETTING, R, META_SSHORT )478 add( OLYMPUS_MCS_CONTRAST_SETTING, "MCSContrastSetting", META_SSHORT ); add( OLYMPUS_MCS_CUSTOM_SATURATION, R, META_SSHORT )479 add( OLYMPUS_MCS_CUSTOM_SATURATION, "MCSCustomSaturation", META_SSHORT ); add( OLYMPUS_MCS_DISTORTION_CORRECTION, R, META_USHORT )480 add( OLYMPUS_MCS_DISTORTION_CORRECTION, "MCSDistortionCorrection", META_USHORT ); add( OLYMPUS_MCS_EXPOSURE_MODE, R, META_USHORT )481 add( OLYMPUS_MCS_EXPOSURE_MODE, "MCSExposureMode", META_USHORT ); add( OLYMPUS_MCS_FLASH_EXPOSURE_COMPENSATION, R, META_SRATIONAL )482 add( OLYMPUS_MCS_FLASH_EXPOSURE_COMPENSATION, "MCSFlashExposureCompensation", META_SRATIONAL ); add( OLYMPUS_MCS_FLASH_MODE, R, META_USHORT )483 add( OLYMPUS_MCS_FLASH_MODE, "MCSFlashMode", META_USHORT ); add( OLYMPUS_MCS_FOCUS_MODE, R, META_USHORT )484 add( OLYMPUS_MCS_FOCUS_MODE, "MCSFocusMode", META_USHORT ); add( OLYMPUS_MCS_FOCUS_PROCESS, R, META_USHORT )485 add( OLYMPUS_MCS_FOCUS_PROCESS, "MCSFocusProcess", META_USHORT ); add( OLYMPUS_MCS_GRADATION, R, META_USHORT )486 add( OLYMPUS_MCS_GRADATION, "MCSGradation", META_USHORT ); add( OLYMPUS_MCS_IMAGE_QUALITY_2, R, META_USHORT )487 add( OLYMPUS_MCS_IMAGE_QUALITY_2, "MCSImageQuality2", META_USHORT ); add( OLYMPUS_MCS_MACRO_MODE, R, META_USHORT )488 add( OLYMPUS_MCS_MACRO_MODE, "MCSMacroMode", META_USHORT ); add( OLYMPUS_MCS_METERING_MODE, R, META_USHORT )489 add( OLYMPUS_MCS_METERING_MODE, "MCSMeteringMode", META_USHORT ); add( OLYMPUS_MCS_MODIFIED_SATURATION, R, META_USHORT )490 add( OLYMPUS_MCS_MODIFIED_SATURATION, "MCSModifiedSaturation", META_USHORT ); add( OLYMPUS_MCS_NOISE_REDUCTION, R, META_USHORT )491 add( OLYMPUS_MCS_NOISE_REDUCTION, "MCSNoiseReduction", META_USHORT ); add( OLYMPUS_MCS_PANORAMA_MODE, R, META_USHORT )492 add( OLYMPUS_MCS_PANORAMA_MODE, "MCSPanoramaMode", META_USHORT ); add( OLYMPUS_MCS_PICTURE_MODE, R, META_USHORT )493 add( OLYMPUS_MCS_PICTURE_MODE, "MCSPictureMode", META_USHORT ); add( OLYMPUS_MCS_PM_BW_FILTER, R, META_SSHORT )494 add( OLYMPUS_MCS_PM_BW_FILTER, "MCSPMBWFilter", META_SSHORT ); add( OLYMPUS_MCS_PM_CONTRAST, R, META_SSHORT )495 add( OLYMPUS_MCS_PM_CONTRAST, "MCSPMContrast", META_SSHORT ); add( OLYMPUS_MCS_PM_HUE, R, META_SSHORT )496 add( OLYMPUS_MCS_PM_HUE, "MCSPMHue", META_SSHORT ); add( OLYMPUS_MCS_PM_SATURATION, R, META_SSHORT )497 add( OLYMPUS_MCS_PM_SATURATION, "MCSPMSaturation", META_SSHORT ); add( OLYMPUS_MCS_PM_SHARPNESS, R, META_SSHORT )498 add( OLYMPUS_MCS_PM_SHARPNESS, "MCSPMSharpness", META_SSHORT ); add( OLYMPUS_MCS_PM_TONE, R, META_SSHORT )499 add( OLYMPUS_MCS_PM_TONE, "MCSPMTone", META_SSHORT ); add( OLYMPUS_MCS_PREVIEW_IMAGE_LENGTH, R, META_ULONG )500 add( OLYMPUS_MCS_PREVIEW_IMAGE_LENGTH, "MCSPreviewImageLength", META_ULONG ); add( OLYMPUS_MCS_PREVIEW_IMAGE_START, R, META_ULONG )501 add( OLYMPUS_MCS_PREVIEW_IMAGE_START, "MCSPreviewImageStart", META_ULONG ); add( OLYMPUS_MCS_PREVIEW_IMAGE_VALID, R, META_ULONG )502 add( OLYMPUS_MCS_PREVIEW_IMAGE_VALID, "MCSPreviewImageValid", META_ULONG ); add( OLYMPUS_MCS_SCENE_MODE, R, META_USHORT )503 add( OLYMPUS_MCS_SCENE_MODE, "MCSSceneMode", META_USHORT ); add( OLYMPUS_MCS_SEQUENCE, R, META_USHORT )504 add( OLYMPUS_MCS_SEQUENCE, "MCSSequence", META_USHORT ); add( OLYMPUS_MCS_SHADING_COMPENSATION, R, META_USHORT )505 add( OLYMPUS_MCS_SHADING_COMPENSATION, "MCSShadingCompensation", META_USHORT ); add( OLYMPUS_MCS_SHARPNESS_SETTING, R, META_SSHORT )506 add( OLYMPUS_MCS_SHARPNESS_SETTING, "MCSSharpnessSetting", META_SSHORT ); add( OLYMPUS_MCS_VERSION, R, META_UNDEFINED )507 add( OLYMPUS_MCS_VERSION, "MCSVersion", META_UNDEFINED ); add( OLYMPUS_MCS_WHITE_BALANCE, R, META_USHORT )508 add( OLYMPUS_MCS_WHITE_BALANCE, "MCSWhiteBalance", META_USHORT ); add( OLYMPUS_MCS_WHITE_BALANCE_BRACKET, R, META_SSHORT )509 add( OLYMPUS_MCS_WHITE_BALANCE_BRACKET, "MCSWhiteBalanceBracket", META_SSHORT ); add( OLYMPUS_MCS_WHITE_BALANCE_TEMP, R, META_USHORT )510 add( OLYMPUS_MCS_WHITE_BALANCE_TEMP, "MCSWhiteBalanceTemp", META_USHORT ); add( OLYMPUS_MINOLTA_CAMERA_SETTINGS, R, META_UNDEFINED )511 add( OLYMPUS_MINOLTA_CAMERA_SETTINGS, "CameraSettings", META_UNDEFINED ); add( OLYMPUS_MINOLTA_CAMERA_SETTINGS_OLD, R, META_UNDEFINED )512 add( OLYMPUS_MINOLTA_CAMERA_SETTINGS_OLD, "CameraSettingsOld", META_UNDEFINED ); add( OLYMPUS_NEAR_LENS_STEP, R, META_USHORT )513 add( OLYMPUS_NEAR_LENS_STEP, "NearLensStep", META_USHORT ); add( OLYMPUS_NOISE_REDUCTION, R, META_USHORT )514 add( OLYMPUS_NOISE_REDUCTION, "NoiseReduction", META_USHORT ); add( OLYMPUS_ONE_TOUCH_WHITE_BALANCE, R, META_USHORT )515 add( OLYMPUS_ONE_TOUCH_WHITE_BALANCE, "OneTouchWhiteBalance", META_USHORT ); add( OLYMPUS_PREVIEW_IMAGE_LENGTH, R, META_ULONG )516 add( OLYMPUS_PREVIEW_IMAGE_LENGTH, "PreviewImageLength", META_ULONG ); add( OLYMPUS_PREVIEW_IMAGE_LENGTH_2, R, META_ULONG )517 add( OLYMPUS_PREVIEW_IMAGE_LENGTH_2, "PreviewImageLength2", META_ULONG ); add( OLYMPUS_PREVIEW_IMAGE_START, R, META_ULONG )518 add( OLYMPUS_PREVIEW_IMAGE_START, "PreviewImageStart", META_ULONG ); add( OLYMPUS_PREVIEW_IMAGE_START_2, R, META_ULONG )519 add( OLYMPUS_PREVIEW_IMAGE_START_2, "PreviewImageStart2", META_ULONG ); add( OLYMPUS_PREVIEW_IMAGE_VALID, R, META_ULONG )520 add( OLYMPUS_PREVIEW_IMAGE_VALID, "PreviewImageValid", META_ULONG ); add( OLYMPUS_QUALITY, R, META_USHORT )521 add( OLYMPUS_QUALITY, "Quality", META_USHORT ); add( OLYMPUS_QUALITY_2, R, META_USHORT )522 add( OLYMPUS_QUALITY_2, "Quality2", META_USHORT ); add( OLYMPUS_RED_BALANCE, R, META_USHORT )523 add( OLYMPUS_RED_BALANCE, "RedBalance", META_USHORT ); add( OLYMPUS_SCENE_DETECT, R, META_USHORT )524 add( OLYMPUS_SCENE_DETECT, "SceneDetect", META_USHORT ); add( OLYMPUS_SCENE_MODE, R, META_USHORT )525 add( OLYMPUS_SCENE_MODE, "SceneMode", META_USHORT ); add( OLYMPUS_SENSOR_TEMPERATURE, R, META_SSHORT )526 add( OLYMPUS_SENSOR_TEMPERATURE, "SensorTemperature", META_SSHORT ); add( OLYMPUS_SERIAL_NUMBER, R, META_STRING )527 add( OLYMPUS_SERIAL_NUMBER, "SerialNumber", META_STRING ); add( OLYMPUS_SERIAL_NUMBER_2, R, META_STRING )528 add( OLYMPUS_SERIAL_NUMBER_2, "SerialNumber2", META_STRING ); add( OLYMPUS_SHARPNESS, R, META_USHORT )529 add( OLYMPUS_SHARPNESS, "Sharpness", META_USHORT ); add( OLYMPUS_SHARPNESS_FACTOR, R, META_USHORT )530 add( OLYMPUS_SHARPNESS_FACTOR, "SharpnessFactor", META_USHORT ); add( OLYMPUS_SHUTTER_SPEED, R, META_SRATIONAL )531 add( OLYMPUS_SHUTTER_SPEED, "ShutterSpeed", META_SRATIONAL ); add( OLYMPUS_SPECIAL_MODE, R, META_ULONG )532 add( OLYMPUS_SPECIAL_MODE, "SpecialMode", META_ULONG ); add( OLYMPUS_TEXT_INFO, R, META_UNDEFINED )533 add( OLYMPUS_TEXT_INFO, "TextInfo", META_UNDEFINED ); add( OLYMPUS_WHITE_BALANCE_BIAS, R, META_USHORT )534 add( OLYMPUS_WHITE_BALANCE_BIAS, "WhiteBalanceBias", META_USHORT ); add( OLYMPUS_WHITE_BALANCE_BRACKET, R, META_USHORT )535 add( OLYMPUS_WHITE_BALANCE_BRACKET, "WhiteBalanceBracket", META_USHORT ); add( OLYMPUS_WHITE_BALANCE_MODE, R, META_USHORT )536 add( OLYMPUS_WHITE_BALANCE_MODE, "WhiteBalanceMode", META_USHORT ); add( OLYMPUS_WHITE_BOARD, R, META_USHORT )537 add( OLYMPUS_WHITE_BOARD, "WhiteBoard", META_USHORT ); add( OLYMPUS_ZOOM_STEP_COUNT, R, META_USHORT )538 add( OLYMPUS_ZOOM_STEP_COUNT, "ZoomStepCount", META_USHORT ); 539 } 540 } 541 /* vim:set et sw=4 ts=4: */ 542