| 1 | /*
|
|---|
| 2 | * Copyright 2002-2012 Drew Noakes
|
|---|
| 3 | *
|
|---|
| 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
|---|
| 5 | * you may not use this file except in compliance with the License.
|
|---|
| 6 | * You may obtain a copy of the License at
|
|---|
| 7 | *
|
|---|
| 8 | * http://www.apache.org/licenses/LICENSE-2.0
|
|---|
| 9 | *
|
|---|
| 10 | * Unless required by applicable law or agreed to in writing, software
|
|---|
| 11 | * distributed under the License is distributed on an "AS IS" BASIS,
|
|---|
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|---|
| 13 | * See the License for the specific language governing permissions and
|
|---|
| 14 | * limitations under the License.
|
|---|
| 15 | *
|
|---|
| 16 | * More information about this project is available at:
|
|---|
| 17 | *
|
|---|
| 18 | * http://drewnoakes.com/code/exif/
|
|---|
| 19 | * http://code.google.com/p/metadata-extractor/
|
|---|
| 20 | */
|
|---|
| 21 | package com.drew.metadata.exif;
|
|---|
| 22 |
|
|---|
| 23 | import com.drew.lang.annotations.NotNull;
|
|---|
| 24 | import com.drew.metadata.Directory;
|
|---|
| 25 |
|
|---|
| 26 | import java.util.HashMap;
|
|---|
| 27 |
|
|---|
| 28 | /**
|
|---|
| 29 | * Describes Exif tags from the SubIFD directory.
|
|---|
| 30 | *
|
|---|
| 31 | * @author Drew Noakes http://drewnoakes.com
|
|---|
| 32 | */
|
|---|
| 33 | public class ExifSubIFDDirectory extends Directory
|
|---|
| 34 | {
|
|---|
| 35 | /**
|
|---|
| 36 | * The actual aperture value of lens when the image was taken. Unit is APEX.
|
|---|
| 37 | * To convert this value to ordinary F-number (F-stop), calculate this value's
|
|---|
| 38 | * power of root 2 (=1.4142). For example, if the ApertureValue is '5',
|
|---|
| 39 | * F-number is 1.4142^5 = F5.6.
|
|---|
| 40 | */
|
|---|
| 41 | public static final int TAG_APERTURE = 0x9202;
|
|---|
| 42 | /**
|
|---|
| 43 | * When image format is no compression, this value shows the number of bits
|
|---|
| 44 | * per component for each pixel. Usually this value is '8,8,8'.
|
|---|
| 45 | */
|
|---|
| 46 | public static final int TAG_BITS_PER_SAMPLE = 0x0102;
|
|---|
| 47 |
|
|---|
| 48 | /**
|
|---|
| 49 | * Shows the color space of the image data components.
|
|---|
| 50 | * 0 = WhiteIsZero
|
|---|
| 51 | * 1 = BlackIsZero
|
|---|
| 52 | * 2 = RGB
|
|---|
| 53 | * 3 = RGB Palette
|
|---|
| 54 | * 4 = Transparency Mask
|
|---|
| 55 | * 5 = CMYK
|
|---|
| 56 | * 6 = YCbCr
|
|---|
| 57 | * 8 = CIELab
|
|---|
| 58 | * 9 = ICCLab
|
|---|
| 59 | * 10 = ITULab
|
|---|
| 60 | * 32803 = Color Filter Array
|
|---|
| 61 | * 32844 = Pixar LogL
|
|---|
| 62 | * 32845 = Pixar LogLuv
|
|---|
| 63 | * 34892 = Linear Raw
|
|---|
| 64 | */
|
|---|
| 65 | public static final int TAG_PHOTOMETRIC_INTERPRETATION = 0x0106;
|
|---|
| 66 |
|
|---|
| 67 | /**
|
|---|
| 68 | * 1 = No dithering or halftoning
|
|---|
| 69 | * 2 = Ordered dither or halftone
|
|---|
| 70 | * 3 = Randomized dither
|
|---|
| 71 | */
|
|---|
| 72 | public static final int TAG_THRESHOLDING = 0x0107;
|
|---|
| 73 |
|
|---|
| 74 | /**
|
|---|
| 75 | * 1 = Normal
|
|---|
| 76 | * 2 = Reversed
|
|---|
| 77 | */
|
|---|
| 78 | public static final int TAG_FILL_ORDER = 0x010A;
|
|---|
| 79 | public static final int TAG_DOCUMENT_NAME = 0x010D;
|
|---|
| 80 |
|
|---|
| 81 | /** The position in the file of raster data. */
|
|---|
| 82 | public static final int TAG_STRIP_OFFSETS = 0x0111;
|
|---|
| 83 | /** Each pixel is composed of this many samples. */
|
|---|
| 84 | public static final int TAG_SAMPLES_PER_PIXEL = 0x0115;
|
|---|
| 85 | /** The raster is codified by a single block of data holding this many rows. */
|
|---|
| 86 | public static final int TAG_ROWS_PER_STRIP = 0x116;
|
|---|
| 87 | /** The size of the raster data in bytes. */
|
|---|
| 88 | public static final int TAG_STRIP_BYTE_COUNTS = 0x0117;
|
|---|
| 89 | public static final int TAG_MIN_SAMPLE_VALUE = 0x0118;
|
|---|
| 90 | public static final int TAG_MAX_SAMPLE_VALUE = 0x0119;
|
|---|
| 91 | /**
|
|---|
| 92 | * When image format is no compression YCbCr, this value shows byte aligns of
|
|---|
| 93 | * YCbCr data. If value is '1', Y/Cb/Cr value is chunky format, contiguous for
|
|---|
| 94 | * each subsampling pixel. If value is '2', Y/Cb/Cr value is separated and
|
|---|
| 95 | * stored to Y plane/Cb plane/Cr plane format.
|
|---|
| 96 | */
|
|---|
| 97 | public static final int TAG_PLANAR_CONFIGURATION = 0x011C;
|
|---|
| 98 | public static final int TAG_YCBCR_SUBSAMPLING = 0x0212;
|
|---|
| 99 |
|
|---|
| 100 | /**
|
|---|
| 101 | * The new subfile type tag.
|
|---|
| 102 | * 0 = Full-resolution Image
|
|---|
| 103 | * 1 = Reduced-resolution image
|
|---|
| 104 | * 2 = Single page of multi-page image
|
|---|
| 105 | * 3 = Single page of multi-page reduced-resolution image
|
|---|
| 106 | * 4 = Transparency mask
|
|---|
| 107 | * 5 = Transparency mask of reduced-resolution image
|
|---|
| 108 | * 6 = Transparency mask of multi-page image
|
|---|
| 109 | * 7 = Transparency mask of reduced-resolution multi-page image
|
|---|
| 110 | */
|
|---|
| 111 | public static final int TAG_NEW_SUBFILE_TYPE = 0x00FE;
|
|---|
| 112 | /**
|
|---|
| 113 | * The old subfile type tag.
|
|---|
| 114 | * 1 = Full-resolution image (Main image)
|
|---|
| 115 | * 2 = Reduced-resolution image (Thumbnail)
|
|---|
| 116 | * 3 = Single page of multi-page image
|
|---|
| 117 | */
|
|---|
| 118 | public static final int TAG_SUBFILE_TYPE = 0x00FF;
|
|---|
| 119 | public static final int TAG_TRANSFER_FUNCTION = 0x012D;
|
|---|
| 120 | public static final int TAG_PREDICTOR = 0x013D;
|
|---|
| 121 | public static final int TAG_TILE_WIDTH = 0x0142;
|
|---|
| 122 | public static final int TAG_TILE_LENGTH = 0x0143;
|
|---|
| 123 | public static final int TAG_TILE_OFFSETS = 0x0144;
|
|---|
| 124 | public static final int TAG_TILE_BYTE_COUNTS = 0x0145;
|
|---|
| 125 | public static final int TAG_JPEG_TABLES = 0x015B;
|
|---|
| 126 | public static final int TAG_CFA_REPEAT_PATTERN_DIM = 0x828D;
|
|---|
| 127 | /** There are two definitions for CFA pattern, I don't know the difference... */
|
|---|
| 128 | public static final int TAG_CFA_PATTERN_2 = 0x828E;
|
|---|
| 129 | public static final int TAG_BATTERY_LEVEL = 0x828F;
|
|---|
| 130 | public static final int TAG_IPTC_NAA = 0x83BB;
|
|---|
| 131 | public static final int TAG_INTER_COLOR_PROFILE = 0x8773;
|
|---|
| 132 | public static final int TAG_SPECTRAL_SENSITIVITY = 0x8824;
|
|---|
| 133 | /**
|
|---|
| 134 | * Indicates the Opto-Electric Conversion Function (OECF) specified in ISO 14524.
|
|---|
| 135 | * <p/>
|
|---|
| 136 | * OECF is the relationship between the camera optical input and the image values.
|
|---|
| 137 | * <p/>
|
|---|
| 138 | * The values are:
|
|---|
| 139 | * <ul>
|
|---|
| 140 | * <li>Two shorts, indicating respectively number of columns, and number of rows.</li>
|
|---|
| 141 | * <li>For each column, the column name in a null-terminated ASCII string.</li>
|
|---|
| 142 | * <li>For each cell, an SRATIONAL value.</li>
|
|---|
| 143 | * </ul>
|
|---|
| 144 | */
|
|---|
| 145 | public static final int TAG_OPTO_ELECTRIC_CONVERSION_FUNCTION = 0x8828;
|
|---|
| 146 | public static final int TAG_INTERLACE = 0x8829;
|
|---|
| 147 | public static final int TAG_TIME_ZONE_OFFSET = 0x882A;
|
|---|
| 148 | public static final int TAG_SELF_TIMER_MODE = 0x882B;
|
|---|
| 149 | public static final int TAG_FLASH_ENERGY = 0x920B;
|
|---|
| 150 | public static final int TAG_SPATIAL_FREQ_RESPONSE = 0x920C;
|
|---|
| 151 | public static final int TAG_NOISE = 0x920D;
|
|---|
| 152 | public static final int TAG_IMAGE_NUMBER = 0x9211;
|
|---|
| 153 | public static final int TAG_SECURITY_CLASSIFICATION = 0x9212;
|
|---|
| 154 | public static final int TAG_IMAGE_HISTORY = 0x9213;
|
|---|
| 155 | public static final int TAG_SUBJECT_LOCATION = 0x9214;
|
|---|
| 156 | /** There are two definitions for exposure index, I don't know the difference... */
|
|---|
| 157 | public static final int TAG_EXPOSURE_INDEX_2 = 0x9215;
|
|---|
| 158 | public static final int TAG_TIFF_EP_STANDARD_ID = 0x9216;
|
|---|
| 159 | public static final int TAG_FLASH_ENERGY_2 = 0xA20B;
|
|---|
| 160 | public static final int TAG_SPATIAL_FREQ_RESPONSE_2 = 0xA20C;
|
|---|
| 161 | public static final int TAG_SUBJECT_LOCATION_2 = 0xA214;
|
|---|
| 162 | public static final int TAG_PAGE_NAME = 0x011D;
|
|---|
| 163 | /**
|
|---|
| 164 | * Exposure time (reciprocal of shutter speed). Unit is second.
|
|---|
| 165 | */
|
|---|
| 166 | public static final int TAG_EXPOSURE_TIME = 0x829A;
|
|---|
| 167 | /**
|
|---|
| 168 | * The actual F-number(F-stop) of lens when the image was taken.
|
|---|
| 169 | */
|
|---|
| 170 | public static final int TAG_FNUMBER = 0x829D;
|
|---|
| 171 | /**
|
|---|
| 172 | * Exposure program that the camera used when image was taken. '1' means
|
|---|
| 173 | * manual control, '2' program normal, '3' aperture priority, '4' shutter
|
|---|
| 174 | * priority, '5' program creative (slow program), '6' program action
|
|---|
| 175 | * (high-speed program), '7' portrait mode, '8' landscape mode.
|
|---|
| 176 | */
|
|---|
| 177 | public static final int TAG_EXPOSURE_PROGRAM = 0x8822;
|
|---|
| 178 | public static final int TAG_ISO_EQUIVALENT = 0x8827;
|
|---|
| 179 | public static final int TAG_EXIF_VERSION = 0x9000;
|
|---|
| 180 | public static final int TAG_DATETIME_ORIGINAL = 0x9003;
|
|---|
| 181 | public static final int TAG_DATETIME_DIGITIZED = 0x9004;
|
|---|
| 182 | public static final int TAG_COMPONENTS_CONFIGURATION = 0x9101;
|
|---|
| 183 | /**
|
|---|
| 184 | * Average (rough estimate) compression level in JPEG bits per pixel.
|
|---|
| 185 | * */
|
|---|
| 186 | public static final int TAG_COMPRESSED_AVERAGE_BITS_PER_PIXEL = 0x9102;
|
|---|
| 187 | /**
|
|---|
| 188 | * Shutter speed by APEX value. To convert this value to ordinary 'Shutter Speed';
|
|---|
| 189 | * calculate this value's power of 2, then reciprocal. For example, if the
|
|---|
| 190 | * ShutterSpeedValue is '4', shutter speed is 1/(24)=1/16 second.
|
|---|
| 191 | */
|
|---|
| 192 | public static final int TAG_SHUTTER_SPEED = 0x9201;
|
|---|
| 193 | public static final int TAG_BRIGHTNESS_VALUE = 0x9203;
|
|---|
| 194 | public static final int TAG_EXPOSURE_BIAS = 0x9204;
|
|---|
| 195 | /**
|
|---|
| 196 | * Maximum aperture value of lens. You can convert to F-number by calculating
|
|---|
| 197 | * power of root 2 (same process of ApertureValue:0x9202).
|
|---|
| 198 | * The actual aperture value of lens when the image was taken. To convert this
|
|---|
| 199 | * value to ordinary f-number(f-stop), calculate the value's power of root 2
|
|---|
| 200 | * (=1.4142). For example, if the ApertureValue is '5', f-number is 1.41425^5 = F5.6.
|
|---|
| 201 | */
|
|---|
| 202 | public static final int TAG_MAX_APERTURE = 0x9205;
|
|---|
| 203 | /**
|
|---|
| 204 | * Indicates the distance the autofocus camera is focused to. Tends to be less accurate as distance increases.
|
|---|
| 205 | */
|
|---|
| 206 | public static final int TAG_SUBJECT_DISTANCE = 0x9206;
|
|---|
| 207 | /**
|
|---|
| 208 | * Exposure metering method. '0' means unknown, '1' average, '2' center
|
|---|
| 209 | * weighted average, '3' spot, '4' multi-spot, '5' multi-segment, '6' partial,
|
|---|
| 210 | * '255' other.
|
|---|
| 211 | */
|
|---|
| 212 | public static final int TAG_METERING_MODE = 0x9207;
|
|---|
| 213 |
|
|---|
| 214 | public static final int TAG_LIGHT_SOURCE = 0x9208;
|
|---|
| 215 | /**
|
|---|
| 216 | * White balance (aka light source). '0' means unknown, '1' daylight,
|
|---|
| 217 | * '2' fluorescent, '3' tungsten, '10' flash, '17' standard light A,
|
|---|
| 218 | * '18' standard light B, '19' standard light C, '20' D55, '21' D65,
|
|---|
| 219 | * '22' D75, '255' other.
|
|---|
| 220 | */
|
|---|
| 221 | public static final int TAG_WHITE_BALANCE = 0x9208;
|
|---|
| 222 | /**
|
|---|
| 223 | * 0x0 = 0000000 = No Flash
|
|---|
| 224 | * 0x1 = 0000001 = Fired
|
|---|
| 225 | * 0x5 = 0000101 = Fired, Return not detected
|
|---|
| 226 | * 0x7 = 0000111 = Fired, Return detected
|
|---|
| 227 | * 0x9 = 0001001 = On
|
|---|
| 228 | * 0xd = 0001101 = On, Return not detected
|
|---|
| 229 | * 0xf = 0001111 = On, Return detected
|
|---|
| 230 | * 0x10 = 0010000 = Off
|
|---|
| 231 | * 0x18 = 0011000 = Auto, Did not fire
|
|---|
| 232 | * 0x19 = 0011001 = Auto, Fired
|
|---|
| 233 | * 0x1d = 0011101 = Auto, Fired, Return not detected
|
|---|
| 234 | * 0x1f = 0011111 = Auto, Fired, Return detected
|
|---|
| 235 | * 0x20 = 0100000 = No flash function
|
|---|
| 236 | * 0x41 = 1000001 = Fired, Red-eye reduction
|
|---|
| 237 | * 0x45 = 1000101 = Fired, Red-eye reduction, Return not detected
|
|---|
| 238 | * 0x47 = 1000111 = Fired, Red-eye reduction, Return detected
|
|---|
| 239 | * 0x49 = 1001001 = On, Red-eye reduction
|
|---|
| 240 | * 0x4d = 1001101 = On, Red-eye reduction, Return not detected
|
|---|
| 241 | * 0x4f = 1001111 = On, Red-eye reduction, Return detected
|
|---|
| 242 | * 0x59 = 1011001 = Auto, Fired, Red-eye reduction
|
|---|
| 243 | * 0x5d = 1011101 = Auto, Fired, Red-eye reduction, Return not detected
|
|---|
| 244 | * 0x5f = 1011111 = Auto, Fired, Red-eye reduction, Return detected
|
|---|
| 245 | * 6543210 (positions)
|
|---|
| 246 | *
|
|---|
| 247 | * This is a bitmask.
|
|---|
| 248 | * 0 = flash fired
|
|---|
| 249 | * 1 = return detected
|
|---|
| 250 | * 2 = return able to be detected
|
|---|
| 251 | * 3 = unknown
|
|---|
| 252 | * 4 = auto used
|
|---|
| 253 | * 5 = unknown
|
|---|
| 254 | * 6 = red eye reduction used
|
|---|
| 255 | */
|
|---|
| 256 | public static final int TAG_FLASH = 0x9209;
|
|---|
| 257 | /**
|
|---|
| 258 | * Focal length of lens used to take image. Unit is millimeter.
|
|---|
| 259 | * Nice digital cameras actually save the focal length as a function of how far they are zoomed in.
|
|---|
| 260 | */
|
|---|
| 261 | public static final int TAG_FOCAL_LENGTH = 0x920A;
|
|---|
| 262 | public static final int TAG_USER_COMMENT = 0x9286;
|
|---|
| 263 | public static final int TAG_SUBSECOND_TIME = 0x9290;
|
|---|
| 264 | public static final int TAG_SUBSECOND_TIME_ORIGINAL = 0x9291;
|
|---|
| 265 | public static final int TAG_SUBSECOND_TIME_DIGITIZED = 0x9292;
|
|---|
| 266 | public static final int TAG_FLASHPIX_VERSION = 0xA000;
|
|---|
| 267 | /**
|
|---|
| 268 | * Defines Color Space. DCF image must use sRGB color space so value is
|
|---|
| 269 | * always '1'. If the picture uses the other color space, value is
|
|---|
| 270 | * '65535':Uncalibrated.
|
|---|
| 271 | */
|
|---|
| 272 | public static final int TAG_COLOR_SPACE = 0xA001;
|
|---|
| 273 | public static final int TAG_EXIF_IMAGE_WIDTH = 0xA002;
|
|---|
| 274 | public static final int TAG_EXIF_IMAGE_HEIGHT = 0xA003;
|
|---|
| 275 | public static final int TAG_RELATED_SOUND_FILE = 0xA004;
|
|---|
| 276 | public static final int TAG_FOCAL_PLANE_X_RES = 0xA20E;
|
|---|
| 277 | public static final int TAG_FOCAL_PLANE_Y_RES = 0xA20F;
|
|---|
| 278 | /**
|
|---|
| 279 | * Unit of FocalPlaneXResolution/FocalPlaneYResolution. '1' means no-unit,
|
|---|
| 280 | * '2' inch, '3' centimeter.
|
|---|
| 281 | *
|
|---|
| 282 | * Note: Some of Fujifilm's digicam(e.g.FX2700,FX2900,Finepix4700Z/40i etc)
|
|---|
| 283 | * uses value '3' so it must be 'centimeter', but it seems that they use a
|
|---|
| 284 | * '8.3mm?'(1/3in.?) to their ResolutionUnit. Fuji's BUG? Finepix4900Z has
|
|---|
| 285 | * been changed to use value '2' but it doesn't match to actual value also.
|
|---|
| 286 | */
|
|---|
| 287 | public static final int TAG_FOCAL_PLANE_UNIT = 0xA210;
|
|---|
| 288 | public static final int TAG_EXPOSURE_INDEX = 0xA215;
|
|---|
| 289 | public static final int TAG_SENSING_METHOD = 0xA217;
|
|---|
| 290 | public static final int TAG_FILE_SOURCE = 0xA300;
|
|---|
| 291 | public static final int TAG_SCENE_TYPE = 0xA301;
|
|---|
| 292 | public static final int TAG_CFA_PATTERN = 0xA302;
|
|---|
| 293 |
|
|---|
| 294 | // these tags new with Exif 2.2 (?) [A401 - A4
|
|---|
| 295 | /**
|
|---|
| 296 | * This tag indicates the use of special processing on image data, such as rendering
|
|---|
| 297 | * geared to output. When special processing is performed, the reader is expected to
|
|---|
| 298 | * disable or minimize any further processing.
|
|---|
| 299 | * Tag = 41985 (A401.H)
|
|---|
| 300 | * Type = SHORT
|
|---|
| 301 | * Count = 1
|
|---|
| 302 | * Default = 0
|
|---|
| 303 | * 0 = Normal process
|
|---|
| 304 | * 1 = Custom process
|
|---|
| 305 | * Other = reserved
|
|---|
| 306 | */
|
|---|
| 307 | public static final int TAG_CUSTOM_RENDERED = 0xA401;
|
|---|
| 308 |
|
|---|
| 309 | /**
|
|---|
| 310 | * This tag indicates the exposure mode set when the image was shot. In auto-bracketing
|
|---|
| 311 | * mode, the camera shoots a series of frames of the same scene at different exposure settings.
|
|---|
| 312 | * Tag = 41986 (A402.H)
|
|---|
| 313 | * Type = SHORT
|
|---|
| 314 | * Count = 1
|
|---|
| 315 | * Default = none
|
|---|
| 316 | * 0 = Auto exposure
|
|---|
| 317 | * 1 = Manual exposure
|
|---|
| 318 | * 2 = Auto bracket
|
|---|
| 319 | * Other = reserved
|
|---|
| 320 | */
|
|---|
| 321 | public static final int TAG_EXPOSURE_MODE = 0xA402;
|
|---|
| 322 |
|
|---|
| 323 | /**
|
|---|
| 324 | * This tag indicates the white balance mode set when the image was shot.
|
|---|
| 325 | * Tag = 41987 (A403.H)
|
|---|
| 326 | * Type = SHORT
|
|---|
| 327 | * Count = 1
|
|---|
| 328 | * Default = none
|
|---|
| 329 | * 0 = Auto white balance
|
|---|
| 330 | * 1 = Manual white balance
|
|---|
| 331 | * Other = reserved
|
|---|
| 332 | */
|
|---|
| 333 | public static final int TAG_WHITE_BALANCE_MODE = 0xA403;
|
|---|
| 334 |
|
|---|
| 335 | /**
|
|---|
| 336 | * This tag indicates the digital zoom ratio when the image was shot. If the
|
|---|
| 337 | * numerator of the recorded value is 0, this indicates that digital zoom was
|
|---|
| 338 | * not used.
|
|---|
| 339 | * Tag = 41988 (A404.H)
|
|---|
| 340 | * Type = RATIONAL
|
|---|
| 341 | * Count = 1
|
|---|
| 342 | * Default = none
|
|---|
| 343 | */
|
|---|
| 344 | public static final int TAG_DIGITAL_ZOOM_RATIO = 0xA404;
|
|---|
| 345 |
|
|---|
| 346 | /**
|
|---|
| 347 | * This tag indicates the equivalent focal length assuming a 35mm film camera,
|
|---|
| 348 | * in mm. A value of 0 means the focal length is unknown. Note that this tag
|
|---|
| 349 | * differs from the FocalLength tag.
|
|---|
| 350 | * Tag = 41989 (A405.H)
|
|---|
| 351 | * Type = SHORT
|
|---|
| 352 | * Count = 1
|
|---|
| 353 | * Default = none
|
|---|
| 354 | */
|
|---|
| 355 | public static final int TAG_35MM_FILM_EQUIV_FOCAL_LENGTH = 0xA405;
|
|---|
| 356 |
|
|---|
| 357 | /**
|
|---|
| 358 | * This tag indicates the type of scene that was shot. It can also be used to
|
|---|
| 359 | * record the mode in which the image was shot. Note that this differs from
|
|---|
| 360 | * the scene type (SceneType) tag.
|
|---|
| 361 | * Tag = 41990 (A406.H)
|
|---|
| 362 | * Type = SHORT
|
|---|
| 363 | * Count = 1
|
|---|
| 364 | * Default = 0
|
|---|
| 365 | * 0 = Standard
|
|---|
| 366 | * 1 = Landscape
|
|---|
| 367 | * 2 = Portrait
|
|---|
| 368 | * 3 = Night scene
|
|---|
| 369 | * Other = reserved
|
|---|
| 370 | */
|
|---|
| 371 | public static final int TAG_SCENE_CAPTURE_TYPE = 0xA406;
|
|---|
| 372 |
|
|---|
| 373 | /**
|
|---|
| 374 | * This tag indicates the degree of overall image gain adjustment.
|
|---|
| 375 | * Tag = 41991 (A407.H)
|
|---|
| 376 | * Type = SHORT
|
|---|
| 377 | * Count = 1
|
|---|
| 378 | * Default = none
|
|---|
| 379 | * 0 = None
|
|---|
| 380 | * 1 = Low gain up
|
|---|
| 381 | * 2 = High gain up
|
|---|
| 382 | * 3 = Low gain down
|
|---|
| 383 | * 4 = High gain down
|
|---|
| 384 | * Other = reserved
|
|---|
| 385 | */
|
|---|
| 386 | public static final int TAG_GAIN_CONTROL = 0xA407;
|
|---|
| 387 |
|
|---|
| 388 | /**
|
|---|
| 389 | * This tag indicates the direction of contrast processing applied by the camera
|
|---|
| 390 | * when the image was shot.
|
|---|
| 391 | * Tag = 41992 (A408.H)
|
|---|
| 392 | * Type = SHORT
|
|---|
| 393 | * Count = 1
|
|---|
| 394 | * Default = 0
|
|---|
| 395 | * 0 = Normal
|
|---|
| 396 | * 1 = Soft
|
|---|
| 397 | * 2 = Hard
|
|---|
| 398 | * Other = reserved
|
|---|
| 399 | */
|
|---|
| 400 | public static final int TAG_CONTRAST = 0xA408;
|
|---|
| 401 |
|
|---|
| 402 | /**
|
|---|
| 403 | * This tag indicates the direction of saturation processing applied by the camera
|
|---|
| 404 | * when the image was shot.
|
|---|
| 405 | * Tag = 41993 (A409.H)
|
|---|
| 406 | * Type = SHORT
|
|---|
| 407 | * Count = 1
|
|---|
| 408 | * Default = 0
|
|---|
| 409 | * 0 = Normal
|
|---|
| 410 | * 1 = Low saturation
|
|---|
| 411 | * 2 = High saturation
|
|---|
| 412 | * Other = reserved
|
|---|
| 413 | */
|
|---|
| 414 | public static final int TAG_SATURATION = 0xA409;
|
|---|
| 415 |
|
|---|
| 416 | /**
|
|---|
| 417 | * This tag indicates the direction of sharpness processing applied by the camera
|
|---|
| 418 | * when the image was shot.
|
|---|
| 419 | * Tag = 41994 (A40A.H)
|
|---|
| 420 | * Type = SHORT
|
|---|
| 421 | * Count = 1
|
|---|
| 422 | * Default = 0
|
|---|
| 423 | * 0 = Normal
|
|---|
| 424 | * 1 = Soft
|
|---|
| 425 | * 2 = Hard
|
|---|
| 426 | * Other = reserved
|
|---|
| 427 | */
|
|---|
| 428 | public static final int TAG_SHARPNESS = 0xA40A;
|
|---|
| 429 |
|
|---|
| 430 | // TODO support this tag (I haven't seen a camera's actual implementation of this yet)
|
|---|
| 431 |
|
|---|
| 432 | /**
|
|---|
| 433 | * This tag indicates information on the picture-taking conditions of a particular
|
|---|
| 434 | * camera model. The tag is used only to indicate the picture-taking conditions in
|
|---|
| 435 | * the reader.
|
|---|
| 436 | * Tag = 41995 (A40B.H)
|
|---|
| 437 | * Type = UNDEFINED
|
|---|
| 438 | * Count = Any
|
|---|
| 439 | * Default = none
|
|---|
| 440 | *
|
|---|
| 441 | * The information is recorded in the format shown below. The data is recorded
|
|---|
| 442 | * in Unicode using SHORT type for the number of display rows and columns and
|
|---|
| 443 | * UNDEFINED type for the camera settings. The Unicode (UCS-2) string including
|
|---|
| 444 | * Signature is NULL terminated. The specifics of the Unicode string are as given
|
|---|
| 445 | * in ISO/IEC 10464-1.
|
|---|
| 446 | *
|
|---|
| 447 | * Length Type Meaning
|
|---|
| 448 | * ------+-----------+------------------
|
|---|
| 449 | * 2 SHORT Display columns
|
|---|
| 450 | * 2 SHORT Display rows
|
|---|
| 451 | * Any UNDEFINED Camera setting-1
|
|---|
| 452 | * Any UNDEFINED Camera setting-2
|
|---|
| 453 | * : : :
|
|---|
| 454 | * Any UNDEFINED Camera setting-n
|
|---|
| 455 | */
|
|---|
| 456 | public static final int TAG_DEVICE_SETTING_DESCRIPTION = 0xA40B;
|
|---|
| 457 |
|
|---|
| 458 | /**
|
|---|
| 459 | * This tag indicates the distance to the subject.
|
|---|
| 460 | * Tag = 41996 (A40C.H)
|
|---|
| 461 | * Type = SHORT
|
|---|
| 462 | * Count = 1
|
|---|
| 463 | * Default = none
|
|---|
| 464 | * 0 = unknown
|
|---|
| 465 | * 1 = Macro
|
|---|
| 466 | * 2 = Close view
|
|---|
| 467 | * 3 = Distant view
|
|---|
| 468 | * Other = reserved
|
|---|
| 469 | */
|
|---|
| 470 | public static final int TAG_SUBJECT_DISTANCE_RANGE = 0xA40C;
|
|---|
| 471 |
|
|---|
| 472 | /**
|
|---|
| 473 | * This tag indicates an identifier assigned uniquely to each image. It is
|
|---|
| 474 | * recorded as an ASCII string equivalent to hexadecimal notation and 128-bit
|
|---|
| 475 | * fixed length.
|
|---|
| 476 | * Tag = 42016 (A420.H)
|
|---|
| 477 | * Type = ASCII
|
|---|
| 478 | * Count = 33
|
|---|
| 479 | * Default = none
|
|---|
| 480 | */
|
|---|
| 481 | public static final int TAG_IMAGE_UNIQUE_ID = 0xA420;
|
|---|
| 482 |
|
|---|
| 483 | /** String. */
|
|---|
| 484 | public static final int TAG_CAMERA_OWNER_NAME = 0xA430;
|
|---|
| 485 | /** String. */
|
|---|
| 486 | public static final int TAG_BODY_SERIAL_NUMBER = 0xA431;
|
|---|
| 487 | /** An array of four Rational64u numbers giving focal and aperture ranges. */
|
|---|
| 488 | public static final int TAG_LENS_SPECIFICATION = 0xA432;
|
|---|
| 489 | /** String. */
|
|---|
| 490 | public static final int TAG_LENS_MAKE = 0xA433;
|
|---|
| 491 | /** String. */
|
|---|
| 492 | public static final int TAG_LENS_MODEL = 0xA434;
|
|---|
| 493 | /** String. */
|
|---|
| 494 | public static final int TAG_LENS_SERIAL_NUMBER = 0xA435;
|
|---|
| 495 | /** Rational64u. */
|
|---|
| 496 | public static final int TAG_GAMMA = 0xA500;
|
|---|
| 497 |
|
|---|
| 498 | public static final int TAG_LENS = 0xFDEA;
|
|---|
| 499 |
|
|---|
| 500 | @NotNull
|
|---|
| 501 | protected static final HashMap<Integer, String> _tagNameMap = new HashMap<Integer, String>();
|
|---|
| 502 |
|
|---|
| 503 | static
|
|---|
| 504 | {
|
|---|
| 505 | _tagNameMap.put(TAG_FILL_ORDER, "Fill Order");
|
|---|
| 506 | _tagNameMap.put(TAG_DOCUMENT_NAME, "Document Name");
|
|---|
| 507 | // TODO why don't these tags have fields associated with them?
|
|---|
| 508 | _tagNameMap.put(0x1000, "Related Image File Format");
|
|---|
| 509 | _tagNameMap.put(0x1001, "Related Image Width");
|
|---|
| 510 | _tagNameMap.put(0x1002, "Related Image Length");
|
|---|
| 511 | _tagNameMap.put(0x0156, "Transfer Range");
|
|---|
| 512 | _tagNameMap.put(0x0200, "JPEG Proc");
|
|---|
| 513 | _tagNameMap.put(TAG_COMPRESSED_AVERAGE_BITS_PER_PIXEL, "Compressed Bits Per Pixel");
|
|---|
| 514 | _tagNameMap.put(0x927C, "Maker Note");
|
|---|
| 515 | _tagNameMap.put(0xA005, "Interoperability Offset");
|
|---|
| 516 |
|
|---|
| 517 | _tagNameMap.put(TAG_NEW_SUBFILE_TYPE, "New Subfile Type");
|
|---|
| 518 | _tagNameMap.put(TAG_SUBFILE_TYPE, "Subfile Type");
|
|---|
| 519 | _tagNameMap.put(TAG_BITS_PER_SAMPLE, "Bits Per Sample");
|
|---|
| 520 | _tagNameMap.put(TAG_PHOTOMETRIC_INTERPRETATION, "Photometric Interpretation");
|
|---|
| 521 | _tagNameMap.put(TAG_THRESHOLDING, "Thresholding");
|
|---|
| 522 | _tagNameMap.put(TAG_STRIP_OFFSETS, "Strip Offsets");
|
|---|
| 523 | _tagNameMap.put(TAG_SAMPLES_PER_PIXEL, "Samples Per Pixel");
|
|---|
| 524 | _tagNameMap.put(TAG_ROWS_PER_STRIP, "Rows Per Strip");
|
|---|
| 525 | _tagNameMap.put(TAG_STRIP_BYTE_COUNTS, "Strip Byte Counts");
|
|---|
| 526 | _tagNameMap.put(TAG_PAGE_NAME, "Page Name");
|
|---|
| 527 | _tagNameMap.put(TAG_PLANAR_CONFIGURATION, "Planar Configuration");
|
|---|
| 528 | _tagNameMap.put(TAG_TRANSFER_FUNCTION, "Transfer Function");
|
|---|
| 529 | _tagNameMap.put(TAG_PREDICTOR, "Predictor");
|
|---|
| 530 | _tagNameMap.put(TAG_TILE_WIDTH, "Tile Width");
|
|---|
| 531 | _tagNameMap.put(TAG_TILE_LENGTH, "Tile Length");
|
|---|
| 532 | _tagNameMap.put(TAG_TILE_OFFSETS, "Tile Offsets");
|
|---|
| 533 | _tagNameMap.put(TAG_TILE_BYTE_COUNTS, "Tile Byte Counts");
|
|---|
| 534 | _tagNameMap.put(TAG_JPEG_TABLES, "JPEG Tables");
|
|---|
| 535 | _tagNameMap.put(TAG_YCBCR_SUBSAMPLING, "YCbCr Sub-Sampling");
|
|---|
| 536 | _tagNameMap.put(TAG_CFA_REPEAT_PATTERN_DIM, "CFA Repeat Pattern Dim");
|
|---|
| 537 | _tagNameMap.put(TAG_CFA_PATTERN_2, "CFA Pattern");
|
|---|
| 538 | _tagNameMap.put(TAG_BATTERY_LEVEL, "Battery Level");
|
|---|
| 539 | _tagNameMap.put(TAG_EXPOSURE_TIME, "Exposure Time");
|
|---|
| 540 | _tagNameMap.put(TAG_FNUMBER, "F-Number");
|
|---|
| 541 | _tagNameMap.put(TAG_IPTC_NAA, "IPTC/NAA");
|
|---|
| 542 | _tagNameMap.put(TAG_INTER_COLOR_PROFILE, "Inter Color Profile");
|
|---|
| 543 | _tagNameMap.put(TAG_EXPOSURE_PROGRAM, "Exposure Program");
|
|---|
| 544 | _tagNameMap.put(TAG_SPECTRAL_SENSITIVITY, "Spectral Sensitivity");
|
|---|
| 545 | _tagNameMap.put(TAG_ISO_EQUIVALENT, "ISO Speed Ratings");
|
|---|
| 546 | _tagNameMap.put(TAG_OPTO_ELECTRIC_CONVERSION_FUNCTION, "Opto-electric Conversion Function (OECF)");
|
|---|
| 547 | _tagNameMap.put(TAG_INTERLACE, "Interlace");
|
|---|
| 548 | _tagNameMap.put(TAG_TIME_ZONE_OFFSET, "Time Zone Offset");
|
|---|
| 549 | _tagNameMap.put(TAG_SELF_TIMER_MODE, "Self Timer Mode");
|
|---|
| 550 | _tagNameMap.put(TAG_EXIF_VERSION, "Exif Version");
|
|---|
| 551 | _tagNameMap.put(TAG_DATETIME_ORIGINAL, "Date/Time Original");
|
|---|
| 552 | _tagNameMap.put(TAG_DATETIME_DIGITIZED, "Date/Time Digitized");
|
|---|
| 553 | _tagNameMap.put(TAG_COMPONENTS_CONFIGURATION, "Components Configuration");
|
|---|
| 554 | _tagNameMap.put(TAG_SHUTTER_SPEED, "Shutter Speed Value");
|
|---|
| 555 | _tagNameMap.put(TAG_APERTURE, "Aperture Value");
|
|---|
| 556 | _tagNameMap.put(TAG_BRIGHTNESS_VALUE, "Brightness Value");
|
|---|
| 557 | _tagNameMap.put(TAG_EXPOSURE_BIAS, "Exposure Bias Value");
|
|---|
| 558 | _tagNameMap.put(TAG_MAX_APERTURE, "Max Aperture Value");
|
|---|
| 559 | _tagNameMap.put(TAG_SUBJECT_DISTANCE, "Subject Distance");
|
|---|
| 560 | _tagNameMap.put(TAG_METERING_MODE, "Metering Mode");
|
|---|
| 561 | _tagNameMap.put(TAG_LIGHT_SOURCE, "Light Source");
|
|---|
| 562 | _tagNameMap.put(TAG_WHITE_BALANCE, "White Balance");
|
|---|
| 563 | _tagNameMap.put(TAG_FLASH, "Flash");
|
|---|
| 564 | _tagNameMap.put(TAG_FOCAL_LENGTH, "Focal Length");
|
|---|
| 565 | _tagNameMap.put(TAG_FLASH_ENERGY, "Flash Energy");
|
|---|
| 566 | _tagNameMap.put(TAG_SPATIAL_FREQ_RESPONSE, "Spatial Frequency Response");
|
|---|
| 567 | _tagNameMap.put(TAG_NOISE, "Noise");
|
|---|
| 568 | _tagNameMap.put(TAG_IMAGE_NUMBER, "Image Number");
|
|---|
| 569 | _tagNameMap.put(TAG_SECURITY_CLASSIFICATION, "Security Classification");
|
|---|
| 570 | _tagNameMap.put(TAG_IMAGE_HISTORY, "Image History");
|
|---|
| 571 | _tagNameMap.put(TAG_SUBJECT_LOCATION, "Subject Location");
|
|---|
| 572 | _tagNameMap.put(TAG_EXPOSURE_INDEX, "Exposure Index");
|
|---|
| 573 | _tagNameMap.put(TAG_TIFF_EP_STANDARD_ID, "TIFF/EP Standard ID");
|
|---|
| 574 | _tagNameMap.put(TAG_USER_COMMENT, "User Comment");
|
|---|
| 575 | _tagNameMap.put(TAG_SUBSECOND_TIME, "Sub-Sec Time");
|
|---|
| 576 | _tagNameMap.put(TAG_SUBSECOND_TIME_ORIGINAL, "Sub-Sec Time Original");
|
|---|
| 577 | _tagNameMap.put(TAG_SUBSECOND_TIME_DIGITIZED, "Sub-Sec Time Digitized");
|
|---|
| 578 | _tagNameMap.put(TAG_FLASHPIX_VERSION, "FlashPix Version");
|
|---|
| 579 | _tagNameMap.put(TAG_COLOR_SPACE, "Color Space");
|
|---|
| 580 | _tagNameMap.put(TAG_EXIF_IMAGE_WIDTH, "Exif Image Width");
|
|---|
| 581 | _tagNameMap.put(TAG_EXIF_IMAGE_HEIGHT, "Exif Image Height");
|
|---|
| 582 | _tagNameMap.put(TAG_RELATED_SOUND_FILE, "Related Sound File");
|
|---|
| 583 | // 0x920B in TIFF/EP
|
|---|
| 584 | _tagNameMap.put(TAG_FLASH_ENERGY_2, "Flash Energy");
|
|---|
| 585 | // 0x920C in TIFF/EP
|
|---|
| 586 | _tagNameMap.put(TAG_SPATIAL_FREQ_RESPONSE_2, "Spatial Frequency Response");
|
|---|
| 587 | // 0x920E in TIFF/EP
|
|---|
| 588 | _tagNameMap.put(TAG_FOCAL_PLANE_X_RES, "Focal Plane X Resolution");
|
|---|
| 589 | // 0x920F in TIFF/EP
|
|---|
| 590 | _tagNameMap.put(TAG_FOCAL_PLANE_Y_RES, "Focal Plane Y Resolution");
|
|---|
| 591 | // 0x9210 in TIFF/EP
|
|---|
| 592 | _tagNameMap.put(TAG_FOCAL_PLANE_UNIT, "Focal Plane Resolution Unit");
|
|---|
| 593 | // 0x9214 in TIFF/EP
|
|---|
| 594 | _tagNameMap.put(TAG_SUBJECT_LOCATION_2, "Subject Location");
|
|---|
| 595 | // 0x9215 in TIFF/EP
|
|---|
| 596 | _tagNameMap.put(TAG_EXPOSURE_INDEX_2, "Exposure Index");
|
|---|
| 597 | // 0x9217 in TIFF/EP
|
|---|
| 598 | _tagNameMap.put(TAG_SENSING_METHOD, "Sensing Method");
|
|---|
| 599 | _tagNameMap.put(TAG_FILE_SOURCE, "File Source");
|
|---|
| 600 | _tagNameMap.put(TAG_SCENE_TYPE, "Scene Type");
|
|---|
| 601 | _tagNameMap.put(TAG_CFA_PATTERN, "CFA Pattern");
|
|---|
| 602 |
|
|---|
| 603 | _tagNameMap.put(TAG_CUSTOM_RENDERED, "Custom Rendered");
|
|---|
| 604 | _tagNameMap.put(TAG_EXPOSURE_MODE, "Exposure Mode");
|
|---|
| 605 | _tagNameMap.put(TAG_WHITE_BALANCE_MODE, "White Balance Mode");
|
|---|
| 606 | _tagNameMap.put(TAG_DIGITAL_ZOOM_RATIO, "Digital Zoom Ratio");
|
|---|
| 607 | _tagNameMap.put(TAG_35MM_FILM_EQUIV_FOCAL_LENGTH, "Focal Length 35");
|
|---|
| 608 | _tagNameMap.put(TAG_SCENE_CAPTURE_TYPE, "Scene Capture Type");
|
|---|
| 609 | _tagNameMap.put(TAG_GAIN_CONTROL, "Gain Control");
|
|---|
| 610 | _tagNameMap.put(TAG_CONTRAST, "Contrast");
|
|---|
| 611 | _tagNameMap.put(TAG_SATURATION, "Saturation");
|
|---|
| 612 | _tagNameMap.put(TAG_SHARPNESS, "Sharpness");
|
|---|
| 613 | _tagNameMap.put(TAG_DEVICE_SETTING_DESCRIPTION, "Device Setting Description");
|
|---|
| 614 | _tagNameMap.put(TAG_SUBJECT_DISTANCE_RANGE, "Subject Distance Range");
|
|---|
| 615 | _tagNameMap.put(TAG_IMAGE_UNIQUE_ID, "Unique Image ID");
|
|---|
| 616 |
|
|---|
| 617 | _tagNameMap.put(TAG_CAMERA_OWNER_NAME, "Camera Owner Name");
|
|---|
| 618 | _tagNameMap.put(TAG_BODY_SERIAL_NUMBER, "Body Serial Number");
|
|---|
| 619 | _tagNameMap.put(TAG_LENS_SPECIFICATION, "Lens Specification");
|
|---|
| 620 | _tagNameMap.put(TAG_LENS_MAKE, "Lens Make");
|
|---|
| 621 | _tagNameMap.put(TAG_LENS_MODEL, "Lens Model");
|
|---|
| 622 | _tagNameMap.put(TAG_LENS_SERIAL_NUMBER, "Lens Serial Number");
|
|---|
| 623 | _tagNameMap.put(TAG_GAMMA, "Gamma");
|
|---|
| 624 |
|
|---|
| 625 | _tagNameMap.put(TAG_MIN_SAMPLE_VALUE, "Minimum sample value");
|
|---|
| 626 | _tagNameMap.put(TAG_MAX_SAMPLE_VALUE, "Maximum sample value");
|
|---|
| 627 |
|
|---|
| 628 | _tagNameMap.put(TAG_LENS, "Lens");
|
|---|
| 629 | }
|
|---|
| 630 |
|
|---|
| 631 | public ExifSubIFDDirectory()
|
|---|
| 632 | {
|
|---|
| 633 | this.setDescriptor(new ExifSubIFDDescriptor(this));
|
|---|
| 634 | }
|
|---|
| 635 |
|
|---|
| 636 | @NotNull
|
|---|
| 637 | public String getName()
|
|---|
| 638 | {
|
|---|
| 639 | return "Exif SubIFD";
|
|---|
| 640 | }
|
|---|
| 641 |
|
|---|
| 642 | @NotNull
|
|---|
| 643 | protected HashMap<Integer, String> getTagNameMap()
|
|---|
| 644 | {
|
|---|
| 645 | return _tagNameMap;
|
|---|
| 646 | }
|
|---|
| 647 | }
|
|---|