| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
package com.drew.metadata.photoshop; |
| 23 |
|
| 24 |
import com.drew.lang.annotations.NotNull; |
| 25 |
import com.drew.metadata.Directory; |
| 26 |
|
| 27 |
import java.util.HashMap; |
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
@SuppressWarnings("WeakerAccess") |
| 35 |
public class PsdHeaderDirectory extends Directory |
| 36 |
{ |
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
public static final int TAG_CHANNEL_COUNT = 1; |
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
public static final int TAG_IMAGE_HEIGHT = 2; |
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
public static final int TAG_IMAGE_WIDTH = 3; |
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
public static final int TAG_BITS_PER_CHANNEL = 4; |
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
public static final int TAG_COLOR_MODE = 5; |
| 58 |
|
| 59 |
@NotNull |
| 60 |
private static final HashMap<Integer, String> _tagNameMap = new HashMap<Integer, String>(); |
| 61 |
|
| 62 |
static { |
| 63 |
_tagNameMap.put(TAG_CHANNEL_COUNT, "Channel Count"); |
| 64 |
_tagNameMap.put(TAG_IMAGE_HEIGHT, "Image Height"); |
| 65 |
_tagNameMap.put(TAG_IMAGE_WIDTH, "Image Width"); |
| 66 |
_tagNameMap.put(TAG_BITS_PER_CHANNEL, "Bits Per Channel"); |
| 67 |
_tagNameMap.put(TAG_COLOR_MODE, "Color Mode"); |
| 68 |
} |
| 69 |
|
| 70 |
public PsdHeaderDirectory() |
| 71 |
{ |
| 72 |
this.setDescriptor(new PsdHeaderDescriptor(this)); |
| 73 |
} |
| 74 |
|
| 75 |
@Override |
| 76 |
@NotNull |
| 77 |
public String getName() |
| 78 |
{ |
| 79 |
return "PSD Header"; |
| 80 |
} |
| 81 |
|
| 82 |
@Override |
| 83 |
@NotNull |
| 84 |
protected HashMap<Integer, String> getTagNameMap() |
| 85 |
{ |
| 86 |
return _tagNameMap; |
| 87 |
} |
| 88 |
} |