1 | /*
|
---|
2 | * Copyright 2002-2015 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 Casio (type 1) cameras.
|
---|
30 | *
|
---|
31 | * A standard TIFF IFD directory but always uses Motorola (Big-Endian) Byte Alignment.
|
---|
32 | * Makernote data begins immediately (no header).
|
---|
33 | *
|
---|
34 | * @author Drew Noakes https://drewnoakes.com
|
---|
35 | */
|
---|
36 | public class CasioType1MakernoteDirectory extends Directory
|
---|
37 | {
|
---|
38 | public static final int TAG_RECORDING_MODE = 0x0001;
|
---|
39 | public static final int TAG_QUALITY = 0x0002;
|
---|
40 | public static final int TAG_FOCUSING_MODE = 0x0003;
|
---|
41 | public static final int TAG_FLASH_MODE = 0x0004;
|
---|
42 | public static final int TAG_FLASH_INTENSITY = 0x0005;
|
---|
43 | public static final int TAG_OBJECT_DISTANCE = 0x0006;
|
---|
44 | public static final int TAG_WHITE_BALANCE = 0x0007;
|
---|
45 | public static final int TAG_UNKNOWN_1 = 0x0008;
|
---|
46 | public static final int TAG_UNKNOWN_2 = 0x0009;
|
---|
47 | public static final int TAG_DIGITAL_ZOOM = 0x000A;
|
---|
48 | public static final int TAG_SHARPNESS = 0x000B;
|
---|
49 | public static final int TAG_CONTRAST = 0x000C;
|
---|
50 | public static final int TAG_SATURATION = 0x000D;
|
---|
51 | public static final int TAG_UNKNOWN_3 = 0x000E;
|
---|
52 | public static final int TAG_UNKNOWN_4 = 0x000F;
|
---|
53 | public static final int TAG_UNKNOWN_5 = 0x0010;
|
---|
54 | public static final int TAG_UNKNOWN_6 = 0x0011;
|
---|
55 | public static final int TAG_UNKNOWN_7 = 0x0012;
|
---|
56 | public static final int TAG_UNKNOWN_8 = 0x0013;
|
---|
57 | public static final int TAG_CCD_SENSITIVITY = 0x0014;
|
---|
58 |
|
---|
59 | @NotNull
|
---|
60 | protected static final HashMap<Integer, String> _tagNameMap = new HashMap<Integer, String>();
|
---|
61 |
|
---|
62 | static
|
---|
63 | {
|
---|
64 | _tagNameMap.put(TAG_CCD_SENSITIVITY, "CCD Sensitivity");
|
---|
65 | _tagNameMap.put(TAG_CONTRAST, "Contrast");
|
---|
66 | _tagNameMap.put(TAG_DIGITAL_ZOOM, "Digital Zoom");
|
---|
67 | _tagNameMap.put(TAG_FLASH_INTENSITY, "Flash Intensity");
|
---|
68 | _tagNameMap.put(TAG_FLASH_MODE, "Flash Mode");
|
---|
69 | _tagNameMap.put(TAG_FOCUSING_MODE, "Focusing Mode");
|
---|
70 | _tagNameMap.put(TAG_OBJECT_DISTANCE, "Object Distance");
|
---|
71 | _tagNameMap.put(TAG_QUALITY, "Quality");
|
---|
72 | _tagNameMap.put(TAG_RECORDING_MODE, "Recording Mode");
|
---|
73 | _tagNameMap.put(TAG_SATURATION, "Saturation");
|
---|
74 | _tagNameMap.put(TAG_SHARPNESS, "Sharpness");
|
---|
75 | _tagNameMap.put(TAG_UNKNOWN_1, "Makernote Unknown 1");
|
---|
76 | _tagNameMap.put(TAG_UNKNOWN_2, "Makernote Unknown 2");
|
---|
77 | _tagNameMap.put(TAG_UNKNOWN_3, "Makernote Unknown 3");
|
---|
78 | _tagNameMap.put(TAG_UNKNOWN_4, "Makernote Unknown 4");
|
---|
79 | _tagNameMap.put(TAG_UNKNOWN_5, "Makernote Unknown 5");
|
---|
80 | _tagNameMap.put(TAG_UNKNOWN_6, "Makernote Unknown 6");
|
---|
81 | _tagNameMap.put(TAG_UNKNOWN_7, "Makernote Unknown 7");
|
---|
82 | _tagNameMap.put(TAG_UNKNOWN_8, "Makernote Unknown 8");
|
---|
83 | _tagNameMap.put(TAG_WHITE_BALANCE, "White Balance");
|
---|
84 | }
|
---|
85 |
|
---|
86 | public CasioType1MakernoteDirectory()
|
---|
87 | {
|
---|
88 | this.setDescriptor(new CasioType1MakernoteDescriptor(this));
|
---|
89 | }
|
---|
90 |
|
---|
91 | @Override
|
---|
92 | @NotNull
|
---|
93 | public String getName()
|
---|
94 | {
|
---|
95 | return "Casio Makernote";
|
---|
96 | }
|
---|
97 |
|
---|
98 | @Override
|
---|
99 | @NotNull
|
---|
100 | protected HashMap<Integer, String> getTagNameMap()
|
---|
101 | {
|
---|
102 | return _tagNameMap;
|
---|
103 | }
|
---|
104 | }
|
---|