| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 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 |
|
| 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 |
} |