Debian Codegraph @

Source/com/drew/metadata/png/PngChromaticitiesDirectory.java

raw
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 package com.drew.metadata.png;
22
23 import com.drew.lang.annotations.NotNull;
24 import com.drew.metadata.Directory;
25 import com.drew.metadata.TagDescriptor;
26
27 import java.util.HashMap;
28
29 /**
30 * @author Drew Noakes https://drewnoakes.com
31 */
32 @SuppressWarnings("WeakerAccess")
33 public class PngChromaticitiesDirectory extends Directory
34 {
35 public static final int TAG_WHITE_POINT_X = 1;
36 public static final int TAG_WHITE_POINT_Y = 2;
37 public static final int TAG_RED_X = 3;
38 public static final int TAG_RED_Y = 4;
39 public static final int TAG_GREEN_X = 5;
40 public static final int TAG_GREEN_Y = 6;
41 public static final int TAG_BLUE_X = 7;
42 public static final int TAG_BLUE_Y = 8;
43
44 @NotNull
45 protected static final HashMap<Integer, String> _tagNameMap = new HashMap<Integer, String>();
46
47 static {
48 _tagNameMap.put(TAG_WHITE_POINT_X, "White Point X");
49 _tagNameMap.put(TAG_WHITE_POINT_Y, "White Point Y");
50 _tagNameMap.put(TAG_RED_X, "Red X");
51 _tagNameMap.put(TAG_RED_Y, "Red Y");
52 _tagNameMap.put(TAG_GREEN_X, "Green X");
53 _tagNameMap.put(TAG_GREEN_Y, "Green Y");
54 _tagNameMap.put(TAG_BLUE_X, "Blue X");
55 _tagNameMap.put(TAG_BLUE_Y, "Blue Y");
56 }
57
58 public PngChromaticitiesDirectory()
59 {
60 this.setDescriptor(new TagDescriptor<PngChromaticitiesDirectory>(this));
61 }
62
63 @Override
64 @NotNull
65 public String getName()
66 {
67 return "PNG Chromaticities";
68 }
69
70 @Override
71 @NotNull
72 protected HashMap<Integer, String> getTagNameMap()
73 {
74 return _tagNameMap;
75 }
76 }