1 | /*
|
---|
2 | * Copyright 2002-2017 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 |
|
---|
22 | package com.drew.metadata.exif.makernotes;
|
---|
23 |
|
---|
24 | import com.drew.lang.annotations.NotNull;
|
---|
25 | import com.drew.metadata.Directory;
|
---|
26 |
|
---|
27 | import java.util.HashMap;
|
---|
28 |
|
---|
29 | /**
|
---|
30 | * Describes tags specific certain 'newer' Samsung cameras.
|
---|
31 | * <p>
|
---|
32 | * Tag reference from: http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Samsung.html
|
---|
33 | *
|
---|
34 | * @author Kevin Mott https://github.com/kwhopper
|
---|
35 | * @author Drew Noakes https://drewnoakes.com
|
---|
36 | */
|
---|
37 | @SuppressWarnings("WeakerAccess")
|
---|
38 | public class SamsungType2MakernoteDirectory extends Directory
|
---|
39 | {
|
---|
40 | // This list is incomplete
|
---|
41 | public static final int TagMakerNoteVersion = 0x001;
|
---|
42 | public static final int TagDeviceType = 0x0002;
|
---|
43 | public static final int TagSamsungModelId = 0x0003;
|
---|
44 |
|
---|
45 | public static final int TagCameraTemperature = 0x0043;
|
---|
46 |
|
---|
47 | public static final int TagFaceDetect = 0x0100;
|
---|
48 | public static final int TagFaceRecognition = 0x0120;
|
---|
49 | public static final int TagFaceName = 0x0123;
|
---|
50 |
|
---|
51 | // following tags found only in SRW images
|
---|
52 | public static final int TagFirmwareName = 0xa001;
|
---|
53 |
|
---|
54 | @NotNull
|
---|
55 | protected static final HashMap<Integer, String> _tagNameMap = new HashMap<Integer, String>();
|
---|
56 |
|
---|
57 | static
|
---|
58 | {
|
---|
59 | _tagNameMap.put(TagMakerNoteVersion, "Maker Note Version");
|
---|
60 | _tagNameMap.put(TagDeviceType, "Device Type");
|
---|
61 | _tagNameMap.put(TagSamsungModelId, "Model Id");
|
---|
62 |
|
---|
63 | _tagNameMap.put(TagCameraTemperature, "Camera Temperature");
|
---|
64 |
|
---|
65 | _tagNameMap.put(TagFaceDetect, "Face Detect");
|
---|
66 | _tagNameMap.put(TagFaceRecognition, "Face Recognition");
|
---|
67 | _tagNameMap.put(TagFaceName, "Face Name");
|
---|
68 | _tagNameMap.put(TagFirmwareName, "Firmware Name");
|
---|
69 | }
|
---|
70 |
|
---|
71 | public SamsungType2MakernoteDirectory()
|
---|
72 | {
|
---|
73 | this.setDescriptor(new SamsungType2MakernoteDescriptor(this));
|
---|
74 | }
|
---|
75 |
|
---|
76 | @Override
|
---|
77 | @NotNull
|
---|
78 | public String getName()
|
---|
79 | {
|
---|
80 | return "Samsung Makernote";
|
---|
81 | }
|
---|
82 |
|
---|
83 | @Override
|
---|
84 | @NotNull
|
---|
85 | protected HashMap<Integer, String> getTagNameMap()
|
---|
86 | {
|
---|
87 | return _tagNameMap;
|
---|
88 | }
|
---|
89 | }
|
---|