1 | /*
|
---|
2 | * Copyright 2002-2019 Drew Noakes and contributors
|
---|
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;
|
---|
23 |
|
---|
24 | import com.drew.lang.annotations.NotNull;
|
---|
25 | import com.drew.metadata.Directory;
|
---|
26 |
|
---|
27 | import java.util.HashMap;
|
---|
28 |
|
---|
29 | /**
|
---|
30 | * These tags can be found in Panasonic/Leica RAW, RW2 and RWL images. The index values are 'fake' but
|
---|
31 | * chosen specifically to make processing easier
|
---|
32 | *
|
---|
33 | * @author Kevin Mott https://github.com/kwhopper
|
---|
34 | * @author Drew Noakes https://drewnoakes.com
|
---|
35 | */
|
---|
36 | @SuppressWarnings("WeakerAccess")
|
---|
37 | public class PanasonicRawDistortionDirectory extends Directory
|
---|
38 | {
|
---|
39 | // 0 and 1 are checksums
|
---|
40 |
|
---|
41 | public static final int TagDistortionParam02 = 2;
|
---|
42 |
|
---|
43 | public static final int TagDistortionParam04 = 4;
|
---|
44 | public static final int TagDistortionScale = 5;
|
---|
45 |
|
---|
46 | public static final int TagDistortionCorrection = 7;
|
---|
47 | public static final int TagDistortionParam08 = 8;
|
---|
48 | public static final int TagDistortionParam09 = 9;
|
---|
49 |
|
---|
50 | public static final int TagDistortionParam11 = 11;
|
---|
51 | public static final int TagDistortionN = 12;
|
---|
52 |
|
---|
53 | @NotNull
|
---|
54 | protected static final HashMap<Integer, String> _tagNameMap = new HashMap<Integer, String>();
|
---|
55 |
|
---|
56 | static
|
---|
57 | {
|
---|
58 | _tagNameMap.put(TagDistortionParam02, "Distortion Param 2");
|
---|
59 | _tagNameMap.put(TagDistortionParam04, "Distortion Param 4");
|
---|
60 | _tagNameMap.put(TagDistortionScale, "Distortion Scale");
|
---|
61 | _tagNameMap.put(TagDistortionCorrection, "Distortion Correction");
|
---|
62 | _tagNameMap.put(TagDistortionParam08, "Distortion Param 8");
|
---|
63 | _tagNameMap.put(TagDistortionParam09, "Distortion Param 9");
|
---|
64 | _tagNameMap.put(TagDistortionParam11, "Distortion Param 11");
|
---|
65 | _tagNameMap.put(TagDistortionN, "Distortion N");
|
---|
66 | }
|
---|
67 |
|
---|
68 | public PanasonicRawDistortionDirectory()
|
---|
69 | {
|
---|
70 | this.setDescriptor(new PanasonicRawDistortionDescriptor(this));
|
---|
71 | }
|
---|
72 |
|
---|
73 | @Override
|
---|
74 | @NotNull
|
---|
75 | public String getName()
|
---|
76 | {
|
---|
77 | return "PanasonicRaw DistortionInfo";
|
---|
78 | }
|
---|
79 |
|
---|
80 | @Override
|
---|
81 | @NotNull
|
---|
82 | protected HashMap<Integer, String> getTagNameMap()
|
---|
83 | {
|
---|
84 | return _tagNameMap;
|
---|
85 | }
|
---|
86 | }
|
---|