Debian Codegraph @

src/com/drew/metadata/pcx/PcxDirectory.java

raw symbols SCIP
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 package com.drew.metadata.pcx;
22
23 import com.drew.lang.annotations.NotNull;
24 import com.drew.metadata.Directory;
25
26 import java.util.HashMap;
27
28 /**
29 * @author Drew Noakes https://drewnoakes.com
30 */
31 @SuppressWarnings("WeakerAccess")
32 public class PcxDirectory extends Directory
33 {
34 public static final int TAG_VERSION = 1;
35 public static final int TAG_BITS_PER_PIXEL = 2;
36 public static final int TAG_XMIN = 3;
37 public static final int TAG_YMIN = 4;
38 public static final int TAG_XMAX = 5;
39 public static final int TAG_YMAX = 6;
40 public static final int TAG_HORIZONTAL_DPI = 7;
41 public static final int TAG_VERTICAL_DPI = 8;
42 public static final int TAG_PALETTE = 9;
43 public static final int TAG_COLOR_PLANES = 10;
44 public static final int TAG_BYTES_PER_LINE = 11;
45 public static final int TAG_PALETTE_TYPE = 12;
46 public static final int TAG_HSCR_SIZE = 13;
47 public static final int TAG_VSCR_SIZE = 14;
48
49 @NotNull
50 private static final HashMap<Integer, String> _tagNameMap = new HashMap<Integer, String>();
51
52 static {
53 _tagNameMap.put(TAG_VERSION, "Version");
54 _tagNameMap.put(TAG_BITS_PER_PIXEL, "Bits Per Pixel");
55 _tagNameMap.put(TAG_XMIN, "X Min");
56 _tagNameMap.put(TAG_YMIN, "Y Min");
57 _tagNameMap.put(TAG_XMAX, "X Max");
58 _tagNameMap.put(TAG_YMAX, "Y Max");
59 _tagNameMap.put(TAG_HORIZONTAL_DPI, "Horizontal DPI");
60 _tagNameMap.put(TAG_VERTICAL_DPI, "Vertical DPI");
61 _tagNameMap.put(TAG_PALETTE, "Palette");
62 _tagNameMap.put(TAG_COLOR_PLANES, "Color Planes");
63 _tagNameMap.put(TAG_BYTES_PER_LINE, "Bytes Per Line");
64 _tagNameMap.put(TAG_PALETTE_TYPE, "Palette Type");
65 _tagNameMap.put(TAG_HSCR_SIZE, "H Scr Size");
66 _tagNameMap.put(TAG_VSCR_SIZE, "V Scr Size");
67 }
68
69 public PcxDirectory()
70 {
71 this.setDescriptor(new PcxDescriptor(this));
72 }
73
74 @Override
75 @NotNull
76 public String getName()
77 {
78 return "PCX";
79 }
80
81 @Override
82 @NotNull
83 protected HashMap<Integer, String> getTagNameMap()
84 {
85 return _tagNameMap;
86 }
87 }