Ignore:
Timestamp:
2013-08-09T18:05:11+02:00 (12 years ago)
Author:
bastiK
Message:

applied #8895 - Upgrade metadata-extractor to v. 2.6.4 (patch by ebourg)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/com/drew/metadata/exif/OlympusMakernoteDirectory.java

    r4231 r6127  
    11/*
    2  * This is public domain software - that is, you can do whatever you want
    3  * with it, and include it software that is licensed under the GNU or the
    4  * BSD license, or whatever other licence you choose, including proprietary
    5  * closed source licenses.  I do ask that you leave this header in tact.
    6  *
    7  * If you make modifications to this code that you think would benefit the
    8  * wider community, please send me a copy and I'll post it on my site.
    9  *
    10  * If you make use of this code, I'd appreciate hearing about it.
    11  *   drew@drewnoakes.com
    12  * Latest version of this software kept at
    13  *   http://drewnoakes.com/
    14  *
    15  * Created by dnoakes on 27-Nov-2002 10:10:47 using IntelliJ IDEA.
     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/
    1620 */
    1721package com.drew.metadata.exif;
    1822
     23import com.drew.lang.annotations.NotNull;
    1924import com.drew.metadata.Directory;
    2025
     
    2227
    2328/**
    24  * The Olympus makernote is used by many manufacturers, and as such contains some tags that appear specific to
    25  * those manufacturers.  Other users include Konica, Minolta and Epson.
     29 * The Olympus makernote is used by many manufacturers (Konica, Minolta and Epson...), and as such contains some tags
     30 * that appear specific to those manufacturers.
     31 *
     32 * @author Drew Noakes http://drewnoakes.com
    2633 */
    2734public class OlympusMakernoteDirectory extends Directory
    2835{
    29     /**
    30      * Used by Konica / Minolta cameras.
    31      */
     36    /** Used by Konica / Minolta cameras. */
    3237    public static final int TAG_OLYMPUS_MAKERNOTE_VERSION = 0x0000;
    33 
    34     /**
    35      * Used by Konica / Minolta cameras.
    36      */
     38    /** Used by Konica / Minolta cameras. */
    3739    public static final int TAG_OLYMPUS_CAMERA_SETTINGS_1 = 0x0001;
    38 
    39     /**
    40      * Alternate Camera Settings Tag. Used by Konica / Minolta cameras.
    41      */
     40    /** Alternate Camera Settings Tag. Used by Konica / Minolta cameras. */
    4241    public static final int TAG_OLYMPUS_CAMERA_SETTINGS_2 = 0x0003;
    43 
    44     /**
    45      * Used by Konica / Minolta cameras.
    46      */
     42    /** Used by Konica / Minolta cameras. */
    4743    public static final int TAG_OLYMPUS_COMPRESSED_IMAGE_SIZE = 0x0040;
    48 
    49     /**
    50      * Used by Konica / Minolta cameras.
    51      */
     44    /** Used by Konica / Minolta cameras. */
    5245    public static final int TAG_OLYMPUS_MINOLTA_THUMBNAIL_OFFSET_1 = 0x0081;
    53 
    54     /**
    55      * Alternate Thumbnail Offset. Used by Konica / Minolta cameras.
    56      */
     46    /** Alternate Thumbnail Offset. Used by Konica / Minolta cameras. */
    5747    public static final int TAG_OLYMPUS_MINOLTA_THUMBNAIL_OFFSET_2 = 0x0088;
    58 
    59     /**
    60      * Length of thumbnail in bytes. Used by Konica / Minolta cameras.
    61      */
     48    /** Length of thumbnail in bytes. Used by Konica / Minolta cameras. */
    6249    public static final int TAG_OLYMPUS_MINOLTA_THUMBNAIL_LENGTH = 0x0089;
    6350
     
    8471    /**
    8572     * Not 100% sure about this tag.
    86      *
     73     * <p/>
    8774     * Used by Konica / Minolta cameras.
    8875     * 0 = Raw
     
    119106    public static final int TAG_OLYMPUS_MACRO_MODE = 0x0202;
    120107
    121     /**
    122      *
    123      */
    124108    public static final int TAG_OLYMPUS_UNKNOWN_1 = 0x0203;
    125109
    126     /**
    127      * Zoom Factor (0 or 1 = normal)
    128      */
     110    /** Zoom Factor (0 or 1 = normal) */
    129111    public static final int TAG_OLYMPUS_DIGI_ZOOM_RATIO = 0x0204;
    130 
    131     /**
    132      *
    133      */
    134112    public static final int TAG_OLYMPUS_UNKNOWN_2 = 0x0205;
    135 
    136     /**
    137      *
    138      */
    139113    public static final int TAG_OLYMPUS_UNKNOWN_3 = 0x0206;
    140 
    141     /**
    142      *
    143      */
    144114    public static final int TAG_OLYMPUS_FIRMWARE_VERSION = 0x0207;
    145 
    146     /**
    147      *
    148      */
    149115    public static final int TAG_OLYMPUS_PICT_INFO = 0x0208;
    150 
    151     /**
    152      *
    153      */
    154116    public static final int TAG_OLYMPUS_CAMERA_ID = 0x0209;
    155117
     
    166128    public static final int TAG_OLYMPUS_IMAGE_HEIGHT = 0x020C;
    167129
    168     /**
    169      * A string. Used by Epson cameras.
    170      */
     130    /** A string. Used by Epson cameras. */
    171131    public static final int TAG_OLYMPUS_ORIGINAL_MANUFACTURER_MODEL = 0x020D;
    172132
     
    177137    public static final int TAG_OLYMPUS_PRINT_IMAGE_MATCHING_INFO = 0x0E00;
    178138
    179     /**
    180      *
    181      */
    182139    public static final int TAG_OLYMPUS_DATA_DUMP = 0x0F00;
    183 
    184     /**
    185      *
    186      */
    187140    public static final int TAG_OLYMPUS_FLASH_MODE = 0x1004;
    188 
    189     /**
    190      *
    191      */
    192141    public static final int TAG_OLYMPUS_BRACKET = 0x1006;
    193 
    194     /**
    195      *
    196      */
    197142    public static final int TAG_OLYMPUS_FOCUS_MODE = 0x100B;
    198 
    199     /**
    200      *
    201      */
    202143    public static final int TAG_OLYMPUS_FOCUS_DISTANCE = 0x100C;
    203 
    204     /**
    205      *
    206      */
    207144    public static final int TAG_OLYMPUS_ZOOM = 0x100D;
    208 
    209     /**
    210      *
    211      */
    212145    public static final int TAG_OLYMPUS_MACRO_FOCUS = 0x100E;
    213 
    214     /**
    215      *
    216      */
    217146    public static final int TAG_OLYMPUS_SHARPNESS = 0x100F;
    218 
    219     /**
    220      *
    221      */
    222147    public static final int TAG_OLYMPUS_COLOUR_MATRIX = 0x1011;
    223 
    224     /**
    225      *
    226      */
    227148    public static final int TAG_OLYMPUS_BLACK_LEVEL = 0x1012;
    228 
    229     /**
    230      *
    231      */
    232149    public static final int TAG_OLYMPUS_WHITE_BALANCE = 0x1015;
    233 
    234     /**
    235      *
    236      */
    237150    public static final int TAG_OLYMPUS_RED_BIAS = 0x1017;
    238 
    239     /**
    240      *
    241      */
    242151    public static final int TAG_OLYMPUS_BLUE_BIAS = 0x1018;
    243 
    244     /**
    245      *
    246      */
    247152    public static final int TAG_OLYMPUS_SERIAL_NUMBER = 0x101A;
    248 
    249     /**
    250      *
    251      */
    252153    public static final int TAG_OLYMPUS_FLASH_BIAS = 0x1023;
    253 
    254     /**
    255      *
    256      */
    257154    public static final int TAG_OLYMPUS_CONTRAST = 0x1029;
    258 
    259     /**
    260      *
    261      */
    262155    public static final int TAG_OLYMPUS_SHARPNESS_FACTOR = 0x102A;
    263 
    264     /**
    265      *
    266      */
    267156    public static final int TAG_OLYMPUS_COLOUR_CONTROL = 0x102B;
    268 
    269     /**
    270      *
    271      */
    272157    public static final int TAG_OLYMPUS_VALID_BITS = 0x102C;
    273 
    274     /**
    275      *
    276      */
    277158    public static final int TAG_OLYMPUS_CORING_FILTER = 0x102D;
    278 
    279     /**
    280      *
    281      */
    282159    public static final int TAG_OLYMPUS_FINAL_WIDTH = 0x102E;
    283 
    284     /**
    285      *
    286      */
    287160    public static final int TAG_OLYMPUS_FINAL_HEIGHT = 0x102F;
    288 
    289     /**
    290      *
    291      */
    292161    public static final int TAG_OLYMPUS_COMPRESSION_RATIO = 0x1034;
    293162
    294     protected static final HashMap tagNameMap = new HashMap();
    295 
    296     static
    297     {
    298         tagNameMap.put(new Integer(TAG_OLYMPUS_SPECIAL_MODE), "Special Mode");
    299         tagNameMap.put(new Integer(TAG_OLYMPUS_JPEG_QUALITY), "Jpeg Quality");
    300         tagNameMap.put(new Integer(TAG_OLYMPUS_MACRO_MODE), "Macro");
    301         tagNameMap.put(new Integer(TAG_OLYMPUS_UNKNOWN_1), "Makernote Unknown 1");
    302         tagNameMap.put(new Integer(TAG_OLYMPUS_DIGI_ZOOM_RATIO), "DigiZoom Ratio");
    303         tagNameMap.put(new Integer(TAG_OLYMPUS_UNKNOWN_2), "Makernote Unknown 2");
    304         tagNameMap.put(new Integer(TAG_OLYMPUS_UNKNOWN_3), "Makernote Unknown 3");
    305         tagNameMap.put(new Integer(TAG_OLYMPUS_FIRMWARE_VERSION), "Firmware Version");
    306         tagNameMap.put(new Integer(TAG_OLYMPUS_PICT_INFO), "Pict Info");
    307         tagNameMap.put(new Integer(TAG_OLYMPUS_CAMERA_ID), "Camera Id");
    308         tagNameMap.put(new Integer(TAG_OLYMPUS_DATA_DUMP), "Data Dump");
    309         tagNameMap.put(new Integer(TAG_OLYMPUS_MAKERNOTE_VERSION), "Makernote Version");
    310         tagNameMap.put(new Integer(TAG_OLYMPUS_CAMERA_SETTINGS_1), "Camera Settings");
    311         tagNameMap.put(new Integer(TAG_OLYMPUS_CAMERA_SETTINGS_2), "Camera Settings");
    312         tagNameMap.put(new Integer(TAG_OLYMPUS_COMPRESSED_IMAGE_SIZE), "Compressed Image Size");
    313         tagNameMap.put(new Integer(TAG_OLYMPUS_MINOLTA_THUMBNAIL_OFFSET_1), "Thumbnail Offset");
    314         tagNameMap.put(new Integer(TAG_OLYMPUS_MINOLTA_THUMBNAIL_OFFSET_2), "Thumbnail Offset");
    315         tagNameMap.put(new Integer(TAG_OLYMPUS_MINOLTA_THUMBNAIL_LENGTH), "Thumbnail Length");
    316         tagNameMap.put(new Integer(TAG_OLYMPUS_COLOUR_MODE), "Colour Mode");
    317         tagNameMap.put(new Integer(TAG_OLYMPUS_IMAGE_QUALITY_1), "Image Quality");
    318         tagNameMap.put(new Integer(TAG_OLYMPUS_IMAGE_QUALITY_2), "Image Quality");
    319         tagNameMap.put(new Integer(TAG_OLYMPUS_IMAGE_HEIGHT), "Image Height");
    320         tagNameMap.put(new Integer(TAG_OLYMPUS_ORIGINAL_MANUFACTURER_MODEL), "Original Manufacturer Model");
    321         tagNameMap.put(new Integer(TAG_OLYMPUS_PRINT_IMAGE_MATCHING_INFO), "Print Image Matching (PIM) Info");
    322         tagNameMap.put(new Integer(TAG_OLYMPUS_FLASH_MODE), "Flash Mode");
    323         tagNameMap.put(new Integer(TAG_OLYMPUS_BRACKET), "Bracket");
    324         tagNameMap.put(new Integer(TAG_OLYMPUS_FOCUS_MODE), "Focus Mode");
    325         tagNameMap.put(new Integer(TAG_OLYMPUS_FOCUS_DISTANCE), "Focus Distance");
    326         tagNameMap.put(new Integer(TAG_OLYMPUS_ZOOM), "Zoom");
    327         tagNameMap.put(new Integer(TAG_OLYMPUS_MACRO_FOCUS), "Macro Focus");
    328         tagNameMap.put(new Integer(TAG_OLYMPUS_SHARPNESS), "Sharpness");
    329         tagNameMap.put(new Integer(TAG_OLYMPUS_COLOUR_MATRIX), "Colour Matrix");
    330         tagNameMap.put(new Integer(TAG_OLYMPUS_BLACK_LEVEL), "Black Level");
    331         tagNameMap.put(new Integer(TAG_OLYMPUS_WHITE_BALANCE), "White Balance");
    332         tagNameMap.put(new Integer(TAG_OLYMPUS_RED_BIAS), "Red Bias");
    333         tagNameMap.put(new Integer(TAG_OLYMPUS_BLUE_BIAS), "Blue Bias");
    334         tagNameMap.put(new Integer(TAG_OLYMPUS_SERIAL_NUMBER), "Serial Number");
    335         tagNameMap.put(new Integer(TAG_OLYMPUS_FLASH_BIAS), "Flash Bias");
    336         tagNameMap.put(new Integer(TAG_OLYMPUS_CONTRAST), "Contrast");
    337         tagNameMap.put(new Integer(TAG_OLYMPUS_SHARPNESS_FACTOR), "Sharpness Factor");
    338         tagNameMap.put(new Integer(TAG_OLYMPUS_COLOUR_CONTROL), "Colour Control");
    339         tagNameMap.put(new Integer(TAG_OLYMPUS_VALID_BITS), "Valid Bits");
    340         tagNameMap.put(new Integer(TAG_OLYMPUS_CORING_FILTER), "Coring Filter");
    341         tagNameMap.put(new Integer(TAG_OLYMPUS_FINAL_WIDTH), "Final Width");
    342         tagNameMap.put(new Integer(TAG_OLYMPUS_FINAL_HEIGHT), "Final Height");
    343         tagNameMap.put(new Integer(TAG_OLYMPUS_COMPRESSION_RATIO), "Compression Ratio");
     163    @NotNull
     164    protected static final HashMap<Integer, String> _tagNameMap = new HashMap<Integer, String>();
     165
     166    static {
     167        _tagNameMap.put(TAG_OLYMPUS_SPECIAL_MODE, "Special Mode");
     168        _tagNameMap.put(TAG_OLYMPUS_JPEG_QUALITY, "Jpeg Quality");
     169        _tagNameMap.put(TAG_OLYMPUS_MACRO_MODE, "Macro");
     170        _tagNameMap.put(TAG_OLYMPUS_UNKNOWN_1, "Makernote Unknown 1");
     171        _tagNameMap.put(TAG_OLYMPUS_DIGI_ZOOM_RATIO, "DigiZoom Ratio");
     172        _tagNameMap.put(TAG_OLYMPUS_UNKNOWN_2, "Makernote Unknown 2");
     173        _tagNameMap.put(TAG_OLYMPUS_UNKNOWN_3, "Makernote Unknown 3");
     174        _tagNameMap.put(TAG_OLYMPUS_FIRMWARE_VERSION, "Firmware Version");
     175        _tagNameMap.put(TAG_OLYMPUS_PICT_INFO, "Pict Info");
     176        _tagNameMap.put(TAG_OLYMPUS_CAMERA_ID, "Camera Id");
     177        _tagNameMap.put(TAG_OLYMPUS_DATA_DUMP, "Data Dump");
     178        _tagNameMap.put(TAG_OLYMPUS_MAKERNOTE_VERSION, "Makernote Version");
     179        _tagNameMap.put(TAG_OLYMPUS_CAMERA_SETTINGS_1, "Camera Settings");
     180        _tagNameMap.put(TAG_OLYMPUS_CAMERA_SETTINGS_2, "Camera Settings");
     181        _tagNameMap.put(TAG_OLYMPUS_COMPRESSED_IMAGE_SIZE, "Compressed Image Size");
     182        _tagNameMap.put(TAG_OLYMPUS_MINOLTA_THUMBNAIL_OFFSET_1, "Thumbnail Offset");
     183        _tagNameMap.put(TAG_OLYMPUS_MINOLTA_THUMBNAIL_OFFSET_2, "Thumbnail Offset");
     184        _tagNameMap.put(TAG_OLYMPUS_MINOLTA_THUMBNAIL_LENGTH, "Thumbnail Length");
     185        _tagNameMap.put(TAG_OLYMPUS_COLOUR_MODE, "Colour Mode");
     186        _tagNameMap.put(TAG_OLYMPUS_IMAGE_QUALITY_1, "Image Quality");
     187        _tagNameMap.put(TAG_OLYMPUS_IMAGE_QUALITY_2, "Image Quality");
     188        _tagNameMap.put(TAG_OLYMPUS_IMAGE_HEIGHT, "Image Height");
     189        _tagNameMap.put(TAG_OLYMPUS_IMAGE_WIDTH, "Image Width");
     190        _tagNameMap.put(TAG_OLYMPUS_ORIGINAL_MANUFACTURER_MODEL, "Original Manufacturer Model");
     191        _tagNameMap.put(TAG_OLYMPUS_PRINT_IMAGE_MATCHING_INFO, "Print Image Matching (PIM) Info");
     192        _tagNameMap.put(TAG_OLYMPUS_FLASH_MODE, "Flash Mode");
     193        _tagNameMap.put(TAG_OLYMPUS_BRACKET, "Bracket");
     194        _tagNameMap.put(TAG_OLYMPUS_FOCUS_MODE, "Focus Mode");
     195        _tagNameMap.put(TAG_OLYMPUS_FOCUS_DISTANCE, "Focus Distance");
     196        _tagNameMap.put(TAG_OLYMPUS_ZOOM, "Zoom");
     197        _tagNameMap.put(TAG_OLYMPUS_MACRO_FOCUS, "Macro Focus");
     198        _tagNameMap.put(TAG_OLYMPUS_SHARPNESS, "Sharpness");
     199        _tagNameMap.put(TAG_OLYMPUS_COLOUR_MATRIX, "Colour Matrix");
     200        _tagNameMap.put(TAG_OLYMPUS_BLACK_LEVEL, "Black Level");
     201        _tagNameMap.put(TAG_OLYMPUS_WHITE_BALANCE, "White Balance");
     202        _tagNameMap.put(TAG_OLYMPUS_RED_BIAS, "Red Bias");
     203        _tagNameMap.put(TAG_OLYMPUS_BLUE_BIAS, "Blue Bias");
     204        _tagNameMap.put(TAG_OLYMPUS_SERIAL_NUMBER, "Serial Number");
     205        _tagNameMap.put(TAG_OLYMPUS_FLASH_BIAS, "Flash Bias");
     206        _tagNameMap.put(TAG_OLYMPUS_CONTRAST, "Contrast");
     207        _tagNameMap.put(TAG_OLYMPUS_SHARPNESS_FACTOR, "Sharpness Factor");
     208        _tagNameMap.put(TAG_OLYMPUS_COLOUR_CONTROL, "Colour Control");
     209        _tagNameMap.put(TAG_OLYMPUS_VALID_BITS, "Valid Bits");
     210        _tagNameMap.put(TAG_OLYMPUS_CORING_FILTER, "Coring Filter");
     211        _tagNameMap.put(TAG_OLYMPUS_FINAL_WIDTH, "Final Width");
     212        _tagNameMap.put(TAG_OLYMPUS_FINAL_HEIGHT, "Final Height");
     213        _tagNameMap.put(TAG_OLYMPUS_COMPRESSION_RATIO, "Compression Ratio");
    344214    }
    345215
     
    349219    }
    350220
     221    @NotNull
    351222    public String getName()
    352223    {
     
    354225    }
    355226
    356     protected HashMap getTagNameMap()
     227    @NotNull
     228    protected HashMap<Integer, String> getTagNameMap()
    357229    {
    358         return tagNameMap;
     230        return _tagNameMap;
    359231    }
    360232}
Note: See TracChangeset for help on using the changeset viewer.