| 1 | /*
|
|---|
| 2 | * Copyright 2002-2016 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 | * https://drewnoakes.com/code/exif/
|
|---|
| 19 | * https://github.com/drewnoakes/metadata-extractor
|
|---|
| 20 | */
|
|---|
| 21 | package com.drew.metadata.exif.makernotes;
|
|---|
| 22 |
|
|---|
| 23 | import com.drew.lang.annotations.NotNull;
|
|---|
| 24 | import com.drew.metadata.Directory;
|
|---|
| 25 |
|
|---|
| 26 | import java.util.HashMap;
|
|---|
| 27 |
|
|---|
| 28 | /**
|
|---|
| 29 | * Describes tags specific to certain Leica cameras.
|
|---|
| 30 | * <p>
|
|---|
| 31 | * Tag reference from: http://gvsoft.homedns.org/exif/makernote-leica-type1.html
|
|---|
| 32 | *
|
|---|
| 33 | * @author Drew Noakes https://drewnoakes.com
|
|---|
| 34 | */
|
|---|
| 35 | public class LeicaMakernoteDirectory extends Directory
|
|---|
| 36 | {
|
|---|
| 37 | public static final int TAG_QUALITY = 0x0300;
|
|---|
| 38 | public static final int TAG_USER_PROFILE = 0x0302;
|
|---|
| 39 | public static final int TAG_SERIAL_NUMBER = 0x0303;
|
|---|
| 40 | public static final int TAG_WHITE_BALANCE = 0x0304;
|
|---|
| 41 |
|
|---|
| 42 | public static final int TAG_LENS_TYPE = 0x0310;
|
|---|
| 43 | public static final int TAG_EXTERNAL_SENSOR_BRIGHTNESS_VALUE = 0x0311;
|
|---|
| 44 | public static final int TAG_MEASURED_LV = 0x0312;
|
|---|
| 45 | public static final int TAG_APPROXIMATE_F_NUMBER = 0x0313;
|
|---|
| 46 |
|
|---|
| 47 | public static final int TAG_CAMERA_TEMPERATURE = 0x0320;
|
|---|
| 48 | public static final int TAG_COLOR_TEMPERATURE = 0x0321;
|
|---|
| 49 | public static final int TAG_WB_RED_LEVEL = 0x0322;
|
|---|
| 50 | public static final int TAG_WB_GREEN_LEVEL = 0x0323;
|
|---|
| 51 | public static final int TAG_WB_BLUE_LEVEL = 0x0324;
|
|---|
| 52 |
|
|---|
| 53 | public static final int TAG_CCD_VERSION = 0x0330;
|
|---|
| 54 | public static final int TAG_CCD_BOARD_VERSION = 0x0331;
|
|---|
| 55 | public static final int TAG_CONTROLLER_BOARD_VERSION = 0x0332;
|
|---|
| 56 | public static final int TAG_M16_C_VERSION = 0x0333;
|
|---|
| 57 |
|
|---|
| 58 | public static final int TAG_IMAGE_ID_NUMBER = 0x0340;
|
|---|
| 59 |
|
|---|
| 60 | @NotNull
|
|---|
| 61 | protected static final HashMap<Integer, String> _tagNameMap = new HashMap<Integer, String>();
|
|---|
| 62 |
|
|---|
| 63 | static
|
|---|
| 64 | {
|
|---|
| 65 | _tagNameMap.put(TAG_QUALITY, "Quality");
|
|---|
| 66 | _tagNameMap.put(TAG_USER_PROFILE, "User Profile");
|
|---|
| 67 | _tagNameMap.put(TAG_SERIAL_NUMBER, "Serial Number");
|
|---|
| 68 | _tagNameMap.put(TAG_WHITE_BALANCE, "White Balance");
|
|---|
| 69 |
|
|---|
| 70 | _tagNameMap.put(TAG_LENS_TYPE, "Lens Type");
|
|---|
| 71 | _tagNameMap.put(TAG_EXTERNAL_SENSOR_BRIGHTNESS_VALUE, "External Sensor Brightness Value");
|
|---|
| 72 | _tagNameMap.put(TAG_MEASURED_LV, "Measured LV");
|
|---|
| 73 | _tagNameMap.put(TAG_APPROXIMATE_F_NUMBER, "Approximate F Number");
|
|---|
| 74 |
|
|---|
| 75 | _tagNameMap.put(TAG_CAMERA_TEMPERATURE, "Camera Temperature");
|
|---|
| 76 | _tagNameMap.put(TAG_COLOR_TEMPERATURE, "Color Temperature");
|
|---|
| 77 | _tagNameMap.put(TAG_WB_RED_LEVEL, "WB Red Level");
|
|---|
| 78 | _tagNameMap.put(TAG_WB_GREEN_LEVEL, "WB Green Level");
|
|---|
| 79 | _tagNameMap.put(TAG_WB_BLUE_LEVEL, "WB Blue Level");
|
|---|
| 80 |
|
|---|
| 81 | _tagNameMap.put(TAG_CCD_VERSION, "CCD Version");
|
|---|
| 82 | _tagNameMap.put(TAG_CCD_BOARD_VERSION, "CCD Board Version");
|
|---|
| 83 | _tagNameMap.put(TAG_CONTROLLER_BOARD_VERSION, "Controller Board Version");
|
|---|
| 84 | _tagNameMap.put(TAG_M16_C_VERSION, "M16 C Version");
|
|---|
| 85 |
|
|---|
| 86 | _tagNameMap.put(TAG_IMAGE_ID_NUMBER, "Image ID Number");
|
|---|
| 87 | }
|
|---|
| 88 |
|
|---|
| 89 | public LeicaMakernoteDirectory()
|
|---|
| 90 | {
|
|---|
| 91 | this.setDescriptor(new LeicaMakernoteDescriptor(this));
|
|---|
| 92 | }
|
|---|
| 93 |
|
|---|
| 94 | @Override
|
|---|
| 95 | @NotNull
|
|---|
| 96 | public String getName()
|
|---|
| 97 | {
|
|---|
| 98 | return "Leica Makernote";
|
|---|
| 99 | }
|
|---|
| 100 |
|
|---|
| 101 | @Override
|
|---|
| 102 | @NotNull
|
|---|
| 103 | protected HashMap<Integer, String> getTagNameMap()
|
|---|
| 104 | {
|
|---|
| 105 | return _tagNameMap;
|
|---|
| 106 | }
|
|---|
| 107 | }
|
|---|