| 1 | /*
|
|---|
| 2 | * This is public domain software - that is, you can do whatever you want
|
|---|
| 3 | * with it, and include it software that is licensed under the GNU or the
|
|---|
| 4 | * BSD license, or whatever other licence you choose, including proprietary
|
|---|
| 5 | * closed source licenses. I do ask that you leave this header in tact.
|
|---|
| 6 | *
|
|---|
| 7 | * If you make modifications to this code that you think would benefit the
|
|---|
| 8 | * wider community, please send me a copy and I'll post it on my site.
|
|---|
| 9 | *
|
|---|
| 10 | * If you make use of this code, I'd appreciate hearing about it.
|
|---|
| 11 | * drew@drewnoakes.com
|
|---|
| 12 | * Latest version of this software kept at
|
|---|
| 13 | * http://drewnoakes.com/
|
|---|
| 14 | *
|
|---|
| 15 | * Created by dnoakes on 27-Nov-2002 10:10:47 using IntelliJ IDEA.
|
|---|
| 16 | */
|
|---|
| 17 | package com.drew.metadata.exif;
|
|---|
| 18 |
|
|---|
| 19 | import com.drew.metadata.Directory;
|
|---|
| 20 |
|
|---|
| 21 | import java.util.HashMap;
|
|---|
| 22 |
|
|---|
| 23 | /**
|
|---|
| 24 | * Directory for metadata specific to Pentax and Asahi cameras.
|
|---|
| 25 | */
|
|---|
| 26 | public class PentaxMakernoteDirectory extends Directory
|
|---|
| 27 | {
|
|---|
| 28 | /**
|
|---|
| 29 | * 0 = Auto
|
|---|
| 30 | * 1 = Night-scene
|
|---|
| 31 | * 2 = Manual
|
|---|
| 32 | * 4 = Multiple
|
|---|
| 33 | */
|
|---|
| 34 | public static final int TAG_PENTAX_CAPTURE_MODE = 0x0001;
|
|---|
| 35 |
|
|---|
| 36 | /**
|
|---|
| 37 | * 0 = Good
|
|---|
| 38 | * 1 = Better
|
|---|
| 39 | * 2 = Best
|
|---|
| 40 | */
|
|---|
| 41 | public static final int TAG_PENTAX_QUALITY_LEVEL = 0x0002;
|
|---|
| 42 |
|
|---|
| 43 | /**
|
|---|
| 44 | * 2 = Custom
|
|---|
| 45 | * 3 = Auto
|
|---|
| 46 | */
|
|---|
| 47 | public static final int TAG_PENTAX_FOCUS_MODE = 0x0003;
|
|---|
| 48 |
|
|---|
| 49 | /**
|
|---|
| 50 | * 1 = Auto
|
|---|
| 51 | * 2 = Flash on
|
|---|
| 52 | * 4 = Flash off
|
|---|
| 53 | * 6 = Red-eye Reduction
|
|---|
| 54 | */
|
|---|
| 55 | public static final int TAG_PENTAX_FLASH_MODE = 0x0004;
|
|---|
| 56 |
|
|---|
| 57 | /**
|
|---|
| 58 | * 0 = Auto
|
|---|
| 59 | * 1 = Daylight
|
|---|
| 60 | * 2 = Shade
|
|---|
| 61 | * 3 = Tungsten
|
|---|
| 62 | * 4 = Fluorescent
|
|---|
| 63 | * 5 = Manual
|
|---|
| 64 | */
|
|---|
| 65 | public static final int TAG_PENTAX_WHITE_BALANCE = 0x0007;
|
|---|
| 66 |
|
|---|
| 67 | /**
|
|---|
| 68 | * (0 = Off)
|
|---|
| 69 | */
|
|---|
| 70 | public static final int TAG_PENTAX_DIGITAL_ZOOM = 0x000A;
|
|---|
| 71 |
|
|---|
| 72 | /**
|
|---|
| 73 | * 0 = Normal
|
|---|
| 74 | * 1 = Soft
|
|---|
| 75 | * 2 = Hard
|
|---|
| 76 | */
|
|---|
| 77 | public static final int TAG_PENTAX_SHARPNESS = 0x000B;
|
|---|
| 78 |
|
|---|
| 79 | /**
|
|---|
| 80 | * 0 = Normal
|
|---|
| 81 | * 1 = Low
|
|---|
| 82 | * 2 = High
|
|---|
| 83 | */
|
|---|
| 84 | public static final int TAG_PENTAX_CONTRAST = 0x000C;
|
|---|
| 85 |
|
|---|
| 86 | /**
|
|---|
| 87 | * 0 = Normal
|
|---|
| 88 | * 1 = Low
|
|---|
| 89 | * 2 = High
|
|---|
| 90 | */
|
|---|
| 91 | public static final int TAG_PENTAX_SATURATION = 0x000D;
|
|---|
| 92 |
|
|---|
| 93 | /**
|
|---|
| 94 | * 10 = ISO 100
|
|---|
| 95 | * 16 = ISO 200
|
|---|
| 96 | * 100 = ISO 100
|
|---|
| 97 | * 200 = ISO 200
|
|---|
| 98 | */
|
|---|
| 99 | public static final int TAG_PENTAX_ISO_SPEED = 0x0014;
|
|---|
| 100 |
|
|---|
| 101 | /**
|
|---|
| 102 | * 1 = Normal
|
|---|
| 103 | * 2 = Black & White
|
|---|
| 104 | * 3 = Sepia
|
|---|
| 105 | */
|
|---|
| 106 | public static final int TAG_PENTAX_COLOUR = 0x0017;
|
|---|
| 107 |
|
|---|
| 108 | /**
|
|---|
| 109 | * See Print Image Matching for specification.
|
|---|
| 110 | * http://www.ozhiker.com/electronics/pjmt/jpeg_info/pim.html
|
|---|
| 111 | */
|
|---|
| 112 | public static final int TAG_PENTAX_PRINT_IMAGE_MATCHING_INFO = 0x0E00;
|
|---|
| 113 |
|
|---|
| 114 | /**
|
|---|
| 115 | * (String).
|
|---|
| 116 | */
|
|---|
| 117 | public static final int TAG_PENTAX_TIME_ZONE = 0x1000;
|
|---|
| 118 |
|
|---|
| 119 | /**
|
|---|
| 120 | * (String).
|
|---|
| 121 | */
|
|---|
| 122 | public static final int TAG_PENTAX_DAYLIGHT_SAVINGS = 0x1001;
|
|---|
| 123 |
|
|---|
| 124 | protected static final HashMap tagNameMap = new HashMap();
|
|---|
| 125 |
|
|---|
| 126 | static
|
|---|
| 127 | {
|
|---|
| 128 | tagNameMap.put(new Integer(TAG_PENTAX_CAPTURE_MODE), "Capture Mode");
|
|---|
| 129 | tagNameMap.put(new Integer(TAG_PENTAX_QUALITY_LEVEL), "Quality Level");
|
|---|
| 130 | tagNameMap.put(new Integer(TAG_PENTAX_FOCUS_MODE), "Focus Mode");
|
|---|
| 131 | tagNameMap.put(new Integer(TAG_PENTAX_FLASH_MODE), "Flash Mode");
|
|---|
| 132 | tagNameMap.put(new Integer(TAG_PENTAX_WHITE_BALANCE), "White Balance");
|
|---|
| 133 | tagNameMap.put(new Integer(TAG_PENTAX_DIGITAL_ZOOM), "Digital Zoom");
|
|---|
| 134 | tagNameMap.put(new Integer(TAG_PENTAX_SHARPNESS), "Sharpness");
|
|---|
| 135 | tagNameMap.put(new Integer(TAG_PENTAX_CONTRAST), "Contrast");
|
|---|
| 136 | tagNameMap.put(new Integer(TAG_PENTAX_SATURATION), "Saturation");
|
|---|
| 137 | tagNameMap.put(new Integer(TAG_PENTAX_ISO_SPEED), "ISO Speed");
|
|---|
| 138 | tagNameMap.put(new Integer(TAG_PENTAX_COLOUR), "Colour");
|
|---|
| 139 | tagNameMap.put(new Integer(TAG_PENTAX_PRINT_IMAGE_MATCHING_INFO), "Print Image Matching (PIM) Info");
|
|---|
| 140 | tagNameMap.put(new Integer(TAG_PENTAX_TIME_ZONE), "Time Zone");
|
|---|
| 141 | tagNameMap.put(new Integer(TAG_PENTAX_DAYLIGHT_SAVINGS), "Daylight Savings");
|
|---|
| 142 | }
|
|---|
| 143 |
|
|---|
| 144 | public PentaxMakernoteDirectory()
|
|---|
| 145 | {
|
|---|
| 146 | this.setDescriptor(new PentaxMakernoteDescriptor(this));
|
|---|
| 147 | }
|
|---|
| 148 |
|
|---|
| 149 | public String getName()
|
|---|
| 150 | {
|
|---|
| 151 | return "Pentax Makernote";
|
|---|
| 152 | }
|
|---|
| 153 |
|
|---|
| 154 | protected HashMap getTagNameMap()
|
|---|
| 155 | {
|
|---|
| 156 | return tagNameMap;
|
|---|
| 157 | }
|
|---|
| 158 | }
|
|---|