source: josm/trunk/src/com/drew/metadata/exif/makernotes/SamsungType2MakernoteDescriptor.java@ 13061

Last change on this file since 13061 was 13061, checked in by Don-vip, 6 years ago

fix #15505 - update to metadata-extractor 2.10.1

  • Property svn:eol-style set to native
File size: 7.0 KB
Line 
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
22package com.drew.metadata.exif.makernotes;
23
24import com.drew.lang.annotations.NotNull;
25import com.drew.lang.annotations.Nullable;
26import com.drew.metadata.TagDescriptor;
27
28import static com.drew.metadata.exif.makernotes.SamsungType2MakernoteDirectory.*;
29
30/**
31 * Provides human-readable string representations of tag values stored in a {@link SamsungType2MakernoteDirectory}.
32 * <p>
33 * Tag reference from: http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Samsung.html
34 *
35 * @author Kevin Mott https://github.com/kwhopper
36 * @author Drew Noakes https://drewnoakes.com
37 */
38@SuppressWarnings("WeakerAccess")
39public class SamsungType2MakernoteDescriptor extends TagDescriptor<SamsungType2MakernoteDirectory>
40{
41 public SamsungType2MakernoteDescriptor(@NotNull SamsungType2MakernoteDirectory directory)
42 {
43 super(directory);
44 }
45
46 @Override
47 @Nullable
48 public String getDescription(int tagType)
49 {
50 switch (tagType) {
51 case TagMakerNoteVersion:
52 return getMakernoteVersionDescription();
53 case TagDeviceType:
54 return getDeviceTypeDescription();
55 case TagSamsungModelId:
56 return getSamsungModelIdDescription();
57
58 case TagCameraTemperature:
59 return getCameraTemperatureDescription();
60
61 case TagFaceDetect:
62 return getFaceDetectDescription();
63 case TagFaceRecognition:
64 return getFaceRecognitionDescription();
65 default:
66 return super.getDescription(tagType);
67 }
68 }
69
70 @Nullable
71 public String getMakernoteVersionDescription()
72 {
73 return getVersionBytesDescription(TagMakerNoteVersion, 2);
74 }
75
76 @Nullable
77 public String getDeviceTypeDescription()
78 {
79 Integer value = _directory.getInteger(TagDeviceType);
80 if (value == null)
81 return null;
82
83 switch (value)
84 {
85 case 0x1000:
86 return "Compact Digital Camera";
87 case 0x2000:
88 return "High-end NX Camera";
89 case 0x3000:
90 return "HXM Video Camera";
91 case 0x12000:
92 return "Cell Phone";
93 case 0x300000:
94 return "SMX Video Camera";
95 default:
96 return String.format("Unknown (%d)", value);
97 }
98 }
99
100 @Nullable
101 public String getSamsungModelIdDescription()
102 {
103 Integer value = _directory.getInteger(TagSamsungModelId);
104 if (value == null)
105 return null;
106
107 switch (value)
108 {
109 case 0x100101c:
110 return "NX10";
111 /*case 0x1001226:
112 return "HMX-S10BP";*/
113 case 0x1001226:
114 return "HMX-S15BP";
115 case 0x1001233:
116 return "HMX-Q10";
117 /*case 0x1001234:
118 return "HMX-H300";*/
119 case 0x1001234:
120 return "HMX-H304";
121 case 0x100130c:
122 return "NX100";
123 case 0x1001327:
124 return "NX11";
125 case 0x170104e:
126 return "ES70, ES71 / VLUU ES70, ES71 / SL600";
127 case 0x1701052:
128 return "ES73 / VLUU ES73 / SL605";
129 case 0x1701300:
130 return "ES28 / VLUU ES28";
131 case 0x1701303:
132 return "ES74,ES75,ES78 / VLUU ES75,ES78";
133 case 0x2001046:
134 return "PL150 / VLUU PL150 / TL210 / PL151";
135 case 0x2001311:
136 return "PL120,PL121 / VLUU PL120,PL121";
137 case 0x2001315:
138 return "PL170,PL171 / VLUUPL170,PL171";
139 case 0x200131e:
140 return "PL210, PL211 / VLUU PL210, PL211";
141 case 0x2701317:
142 return "PL20,PL21 / VLUU PL20,PL21";
143 case 0x2a0001b:
144 return "WP10 / VLUU WP10 / AQ100";
145 case 0x3000000:
146 return "Various Models (0x3000000)";
147 case 0x3a00018:
148 return "Various Models (0x3a00018)";
149 case 0x400101f:
150 return "ST1000 / ST1100 / VLUU ST1000 / CL65";
151 case 0x4001022:
152 return "ST550 / VLUU ST550 / TL225";
153 case 0x4001025:
154 return "Various Models (0x4001025)";
155 case 0x400103e:
156 return "VLUU ST5500, ST5500, CL80";
157 case 0x4001041:
158 return "VLUU ST5000, ST5000, TL240";
159 case 0x4001043:
160 return "ST70 / VLUU ST70 / ST71";
161 case 0x400130a:
162 return "Various Models (0x400130a)";
163 case 0x400130e:
164 return "ST90,ST91 / VLUU ST90,ST91";
165 case 0x4001313:
166 return "VLUU ST95, ST95";
167 case 0x4a00015:
168 return "VLUU ST60";
169 case 0x4a0135b:
170 return "ST30, ST65 / VLUU ST65 / ST67";
171 case 0x5000000:
172 return "Various Models (0x5000000)";
173 case 0x5001038:
174 return "Various Models (0x5001038)";
175 case 0x500103a:
176 return "WB650 / VLUU WB650 / WB660";
177 case 0x500103c:
178 return "WB600 / VLUU WB600 / WB610";
179 case 0x500133e:
180 return "WB150 / WB150F / WB152 / WB152F / WB151";
181 case 0x5a0000f:
182 return "WB5000 / HZ25W";
183 case 0x6001036:
184 return "EX1";
185 case 0x700131c:
186 return "VLUU SH100, SH100";
187 case 0x27127002:
188 return "SMX - C20N";
189 default:
190 return String.format("Unknown (%d)", value);
191 }
192 }
193
194 @Nullable
195 private String getCameraTemperatureDescription()
196 {
197 return getFormattedInt(TagCameraTemperature, "%d C");
198 }
199
200 @Nullable
201 public String getFaceDetectDescription()
202 {
203 return getIndexedDescription(TagFaceDetect,
204 "Off", "On");
205 }
206
207 @Nullable
208 public String getFaceRecognitionDescription()
209 {
210 return getIndexedDescription(TagFaceRecognition,
211 "Off", "On");
212 }
213}
Note: See TracBrowser for help on using the repository browser.