commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dam...@apache.org
Subject svn commit: r1303315 - in /commons/proper/sanselan/trunk/src: main/java/org/apache/commons/sanselan/formats/tiff/ main/java/org/apache/commons/sanselan/formats/tiff/constants/ main/java/org/apache/commons/sanselan/formats/tiff/taginfos/ test/java/org/a...
Date Wed, 21 Mar 2012 08:56:19 GMT
Author: damjan
Date: Wed Mar 21 08:56:18 2012
New Revision: 1303315

URL: http://svn.apache.org/viewvc?rev=1303315&view=rev
Log:
Factor out more tags.


Added:
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/AdobePhotoshopTagConstants.java
  (with props)
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/TiffEpTagConstants.java
  (with props)
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/taginfos/TagInfoAsciiOrRational.java
  (with props)
Modified:
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/TiffImageParser.java
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/AdobePageMaker6TagConstants.java
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/AllTagConstants.java
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/ExifTagConstants.java
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/Tiff4TagConstants.java
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/TiffFieldTypeConstants.java
    commons/proper/sanselan/trunk/src/test/java/org/apache/commons/sanselan/formats/tiff/TiffTagIntegrityTest.java

Modified: commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/TiffImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/TiffImageParser.java?rev=1303315&r1=1303314&r2=1303315&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/TiffImageParser.java
(original)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/TiffImageParser.java
Wed Mar 21 08:56:18 2012
@@ -24,7 +24,6 @@ import java.io.OutputStream;
 import java.io.PrintWriter;
 import java.io.UnsupportedEncodingException;
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -38,7 +37,7 @@ import org.apache.commons.sanselan.commo
 import org.apache.commons.sanselan.common.ImageBuilder;
 import org.apache.commons.sanselan.common.bytesource.ByteSource;
 import org.apache.commons.sanselan.formats.tiff.TiffDirectory.ImageDataElement;
-import org.apache.commons.sanselan.formats.tiff.constants.ExifTagConstants;
+import org.apache.commons.sanselan.formats.tiff.constants.AllTagConstants;
 import org.apache.commons.sanselan.formats.tiff.constants.TiffConstants;
 import org.apache.commons.sanselan.formats.tiff.constants.TiffTagConstants;
 import org.apache.commons.sanselan.formats.tiff.datareaders.DataReader;
@@ -92,7 +91,7 @@ public class TiffImageParser extends Ima
                 .readFirstDirectory(byteSource, params, false, formatCompliance);
         TiffDirectory directory = contents.directories.get(0);
 
-        return directory.getFieldValue(ExifTagConstants.EXIF_TAG_ICC_PROFILE);
+        return directory.getFieldValue(AllTagConstants.EXIF_TAG_ICC_PROFILE);
     }
 
     public Dimension getImageSize(ByteSource byteSource, Map params)

Modified: commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/AdobePageMaker6TagConstants.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/AdobePageMaker6TagConstants.java?rev=1303315&r1=1303314&r2=1303315&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/AdobePageMaker6TagConstants.java
(original)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/AdobePageMaker6TagConstants.java
Wed Mar 21 08:56:18 2012
@@ -50,7 +50,7 @@ public interface AdobePageMaker6TagConst
             "Image ID", 0x800d, -1,
             TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
     
-    public static final List<TagInfo> ALL_ADOBE_PAGEMAKER_6_TAG_CONSTANTS =
+    public static final List<TagInfo> ALL_ADOBE_PAGEMAKER_6_TAGS =
             Collections.unmodifiableList(Arrays.asList(
                     TIFF_TAG_SUB_IFD,
                     TIFF_TAG_CLIP_PATH,

Added: commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/AdobePhotoshopTagConstants.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/AdobePhotoshopTagConstants.java?rev=1303315&view=auto
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/AdobePhotoshopTagConstants.java
(added)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/AdobePhotoshopTagConstants.java
Wed Mar 21 08:56:18 2012
@@ -0,0 +1,31 @@
+package org.apache.commons.sanselan.formats.tiff.constants;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.commons.sanselan.formats.tiff.taginfos.TagInfo;
+import org.apache.commons.sanselan.formats.tiff.taginfos.TagInfoUndefined;
+
+/**
+ * TIFF specification supplement 2
+ * <BR>
+ * Adobe Photoshop (R) TIFF Technical Notes
+ * <BR>
+ * http://partners.adobe.com/public/developer/en/tiff/TIFFphotoshop.pdf
+ */
+public interface AdobePhotoshopTagConstants {
+    public static final TagInfoUndefined EXIF_TAG_JPEGTABLES = new TagInfoUndefined(
+            "JPEGTables", 0x015b, -1,
+            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
+
+    public static final TagInfoUndefined EXIF_TAG_IMAGE_SOURCE_DATA = new TagInfoUndefined(
+            "Image Source Data", 0x935c, 1,
+            TiffDirectoryType.EXIF_DIRECTORY_IFD0);
+
+    public static final List<TagInfo> ALL_ADOBE_PHOTOSHOP_TAGS =
+            Collections.unmodifiableList(Arrays.asList(new TagInfo[] {
+                    EXIF_TAG_JPEGTABLES,
+                    EXIF_TAG_IMAGE_SOURCE_DATA
+            }));
+}

Propchange: commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/AdobePhotoshopTagConstants.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/AllTagConstants.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/AllTagConstants.java?rev=1303315&r1=1303314&r2=1303315&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/AllTagConstants.java
(original)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/AllTagConstants.java
Wed Mar 21 08:56:18 2012
@@ -19,16 +19,26 @@ package org.apache.commons.sanselan.form
 import java.util.Collections;
 import java.util.List;
 
-import org.apache.commons.sanselan.SanselanConstants;
 import org.apache.commons.sanselan.formats.tiff.taginfos.TagInfo;
 
-public interface AllTagConstants
-        extends
-            SanselanConstants
+public interface AllTagConstants extends
+        AdobePhotoshopTagConstants,
+        AdobePageMaker6TagConstants,
+        DcfTagConstants,
+        ExifTagConstants,
+        GpsTagConstants,
+        HylaFaxTagConstants,
+        MicrosoftTagConstants,
+        Rfc2301TagConstants,
+        Tiff4TagConstants,
+        TiffEpTagConstants,
+        TiffTagConstants,
+        WangTagConstants
 {
     public static final List<TagInfo> ALL_TAGS = Collections.unmodifiableList(
             TagConstantsUtils.mergeTagLists(
-                    AdobePageMaker6TagConstants.ALL_ADOBE_PAGEMAKER_6_TAG_CONSTANTS,
+                    AdobePageMaker6TagConstants.ALL_ADOBE_PAGEMAKER_6_TAGS,
+                    AdobePhotoshopTagConstants.ALL_ADOBE_PHOTOSHOP_TAGS,
                     DcfTagConstants.ALL_DCF_TAGS,
                     ExifTagConstants.ALL_EXIF_TAGS,
                     GpsTagConstants.ALL_GPS_TAGS,
@@ -36,6 +46,7 @@ public interface AllTagConstants
                     MicrosoftTagConstants.ALL_MICROSOFT_TAGS,
                     Rfc2301TagConstants.ALL_RFC_2301_TAGS,
                     Tiff4TagConstants.ALL_TIFF_4_TAGS,
+                    TiffEpTagConstants.ALL_TIFF_EP_TAGS,
                     TiffTagConstants.ALL_TIFF_TAGS,
                     WangTagConstants.ALL_WANG_TAGS));
 }

Modified: commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/ExifTagConstants.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/ExifTagConstants.java?rev=1303315&r1=1303314&r2=1303315&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/ExifTagConstants.java
(original)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/ExifTagConstants.java
Wed Mar 21 08:56:18 2012
@@ -83,8 +83,6 @@ public interface ExifTagConstants
     public static final TagInfoLong EXIF_TAG_JPG_FROM_RAW_LENGTH_SUB_IFD2 = new TagInfoLong(
             "Jpg From Raw Length", 0x0117, 1,
             TiffDirectoryType.EXIF_DIRECTORY_SUB_IFD2);
-    public static final TagInfoUndefined EXIF_TAG_JPEGTABLES = new TagInfoUndefined("JPEGTables",
-            0x015b, -1, TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
     public static final TagInfoLong EXIF_TAG_PREVIEW_IMAGE_START_MAKER_NOTES = new TagInfoLong(
             "Preview Image Start", 0x0201, 1,
             TiffDirectoryType.EXIF_DIRECTORY_MAKER_NOTES);
@@ -123,21 +121,12 @@ public interface ExifTagConstants
             0x80e6, -1, TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
     public static final TagInfoUnknown EXIF_TAG_MODEL_2 = new TagInfoUnknown("Model 2",
             0x827d, -1, TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
-    public static final TagInfoShort EXIF_TAG_CFAREPEAT_PATTERN_DIM = new TagInfoShort(
-            "CFARepeat Pattern Dim", 0x828d, 2,
-            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
-    public static final TagInfoByte EXIF_TAG_CFAPATTERN_2 = new TagInfoByte(
-            "CFAPattern 2", 0x828e, -1,
-            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
-    // FIXME: rational or ascii!!! N4378
-    public static final TagInfoRational EXIF_TAG_BATTERY_LEVEL = new TagInfoRational(
-            "Battery Level", 0x828f, 1,
-            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
     public static final TagInfoRational EXIF_TAG_EXPOSURE_TIME = new TagInfoRational(
-            "Exposure Time", 0x829a, 1,
+            "Exposure Time", 0x829a, -1,
+            TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD);
+    public static final TagInfoRational EXIF_TAG_FNUMBER = new TagInfoRational(
+            "FNumber", 0x829d, -1,
             TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD);
-    public static final TagInfoRational EXIF_TAG_FNUMBER = new TagInfoRational("FNumber",
-            0x829d, 1, TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD);
     public static final TagInfoLong EXIF_TAG_MDFILE_TAG = new TagInfoLong("MDFile Tag",
             0x82a5, 1, TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
     public static final TagInfoRational EXIF_TAG_MDSCALE_PIXEL = new TagInfoRational(
@@ -235,9 +224,6 @@ public interface ExifTagConstants
     public static final TagInfoLong EXIF_TAG_EXIF_OFFSET = new TagInfoLong(
             "Exif Offset", 0x8769, 1,
             TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN, true);
-    public static final TagInfoUndefined EXIF_TAG_ICC_PROFILE = new TagInfoUndefined(
-            "ICC_ Profile", 0x8773, -1,
-            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
     public static final TagInfoShort EXIF_TAG_GEO_TIFF_DIRECTORY = new TagInfoShort(
             "Geo Tiff Directory", 0x87af, -1,
             TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
@@ -259,24 +245,17 @@ public interface ExifTagConstants
     public static final int EXPOSURE_PROGRAM_VALUE_PORTRAIT = 7;
     public static final int EXPOSURE_PROGRAM_VALUE_LANDSCAPE = 8;
     public static final TagInfoAscii EXIF_TAG_SPECTRAL_SENSITIVITY = new TagInfoAscii(
-            "Spectral Sensitivity", 0x8824, 1,
+            "Spectral Sensitivity", 0x8824, -1,
             TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD);
     public static final TagInfoLong EXIF_TAG_GPSINFO = new TagInfoLong(
             "GPSInfo", 0x8825, 1,
             TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN, true);
-    public static final TagInfoShort EXIF_TAG_ISO = new TagInfoShort("ISO", 0x8827,
-            1, TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD);
-    public static final TagInfoUndefined EXIF_TAG_OPTO__ELECTRIC_CONV_FACTOR = new TagInfoUndefined(
-            "Opto - Electric Conv Factor", 0x8828,
-            -1, TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
-    public static final TagInfoShort EXIF_TAG_INTERLACE = new TagInfoShort("Interlace",
-            0x8829, 1, TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
-    public static final TagInfoSShort EXIF_TAG_TIME_ZONE_OFFSET = new TagInfoSShort(
-            "Time Zone Offset", 0x882a, -1,
-            TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD);
-    public static final TagInfoShort EXIF_TAG_SELF_TIMER_MODE = new TagInfoShort(
-            "Self Timer Mode", 0x882b, 1,
+    public static final TagInfoShort EXIF_TAG_ISO = new TagInfoShort(
+            "PhotographicSensitivity", 0x8827, -1,
             TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD);
+    public static final TagInfoUndefined EXIF_TAG_OPTO_ELECTRIC_CONV_FACTOR = new TagInfoUndefined(
+            "Opto - Electric Conv Factor", 0x8828, -1,
+            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
     public static final TagInfoLong EXIF_TAG_LEAF_SUB_IFD = new TagInfoLong(
             "Leaf Sub IFD", 0x888a, 1,
             TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
@@ -310,7 +289,7 @@ public interface ExifTagConstants
             "Max Aperture Value", 0x9205, 1,
             TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD);
     public static final TagInfoRational EXIF_TAG_SUBJECT_DISTANCE = new TagInfoRational(
-            "Subject Distance", 0x9206, 1,
+            "Subject Distance", 0x9206, -1,
             TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD);
     public static final TagInfoShort EXIF_TAG_METERING_MODE = new TagInfoShort(
             "Metering Mode", 0x9207, 1,
@@ -345,8 +324,9 @@ public interface ExifTagConstants
     public static final int LIGHT_SOURCE_VALUE_D50 = 23;
     public static final int LIGHT_SOURCE_VALUE_ISO_STUDIO_TUNGSTEN = 24;
     public static final int LIGHT_SOURCE_VALUE_OTHER = 255;
-    public static final TagInfoShort EXIF_TAG_FLASH = new TagInfoShort("Flash", 0x9209,
-            1, TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD);
+    public static final TagInfoShort EXIF_TAG_FLASH = new TagInfoShort(
+            "Flash", 0x9209, 1,
+            TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD);
     public static final int FLASH_VALUE_NO_FLASH = 0x0;
     public static final int FLASH_VALUE_FIRED = 0x1;
     public static final int FLASH_VALUE_FIRED_RETURN_NOT_DETECTED = 0x5;
@@ -375,58 +355,11 @@ public interface ExifTagConstants
     public static final int FLASH_VALUE_AUTO_FIRED_RED_EYE_REDUCTION_RETURN_NOT_DETECTED
= 0x5d;
     public static final int FLASH_VALUE_AUTO_FIRED_RED_EYE_REDUCTION_RETURN_DETECTED = 0x5f;
     public static final TagInfoRational EXIF_TAG_FOCAL_LENGTH = new TagInfoRational(
-            "Focal Length", 0x920a, 1,
-            TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD);
-    public static final TagInfoRational EXIF_TAG_FLASH_ENERGY = new TagInfoRational(
-            "Flash Energy", 0x920b, -1,
-            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
-    public static final TagInfoUndefined EXIF_TAG_SPATIAL_FREQUENCY_RESPONSE_1 = new TagInfoUndefined(
-            "Spatial Frequency Response", 0x920c,
-            -1, TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
-    public static final TagInfoUndefined EXIF_TAG_NOISE_1 = new TagInfoUndefined("Noise",
0x920d,
-            -1, TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
-    public static final TagInfoRational EXIF_TAG_FOCAL_PLANE_XRESOLUTION = new TagInfoRational(
-            "Focal Plane XResolution", 0x920e,
-            1, TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
-    public static final TagInfoRational EXIF_TAG_FOCAL_PLANE_YRESOLUTION = new TagInfoRational(
-            "Focal Plane YResolution", 0x920f,
-            1, TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
-    public static final TagInfoShort EXIF_TAG_FOCAL_PLANE_RESOLUTION_UNIT = new TagInfoShort(
-            "Focal Plane Resolution Unit", 0x9210,
-            1, TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
-    public static final int FOCAL_PLANE_RESOLUTION_UNIT_VALUE_NONE = 1;
-    public static final int FOCAL_PLANE_RESOLUTION_UNIT_VALUE_INCHES = 2;
-    public static final int FOCAL_PLANE_RESOLUTION_UNIT_VALUE_CM = 3;
-    public static final int FOCAL_PLANE_RESOLUTION_UNIT_VALUE_MM = 4;
-    public static final int FOCAL_PLANE_RESOLUTION_UNIT_VALUE_UM = 5;
-    public static final TagInfoLong EXIF_TAG_IMAGE_NUMBER_EXIF_IFD = new TagInfoLong(
-            "Image Number", 0x9211, 1, TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD);
-    public static final TagInfoAscii EXIF_TAG_SECURITY_CLASSIFICATION_EXIF_IFD = new TagInfoAscii(
-            "Security Classification", 0x9212, 1,
-            TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD);
-    public static final TagInfoAscii EXIF_TAG_IMAGE_HISTORY_EXIF_IFD = new TagInfoAscii(
-            "Image History", 0x9213, 1,
+            "Focal Length", 0x920a, -1,
             TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD);
     public static final TagInfoShort EXIF_TAG_SUBJECT_LOCATION_1 = new TagInfoShort(
-            "Subject Location", 0x9214, 4,
+            "Subject Location", 0x9214, -1,
             TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD);
-    public static final TagInfoRational EXIF_TAG_EXPOSURE_INDEX = new TagInfoRational(
-            "Exposure Index", 0x9215, -1,
-            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
-    public static final TagInfoByte EXIF_TAG_TIFF_EPSTANDARD_ID_1 = new TagInfoByte(
-            "TIFF- EPStandard ID", 0x9216, 4,
-            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
-    public static final TagInfoShort EXIF_TAG_SENSING_METHOD = new TagInfoShort(
-            "Sensing Method", 0x9217, 1,
-            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
-    public static final int SENSING_METHOD_VALUE_MONOCHROME_AREA = 1;
-    public static final int SENSING_METHOD_VALUE_ONE_CHIP_COLOR_AREA = 2;
-    public static final int SENSING_METHOD_VALUE_TWO_CHIP_COLOR_AREA = 3;
-    public static final int SENSING_METHOD_VALUE_THREE_CHIP_COLOR_AREA = 4;
-    public static final int SENSING_METHOD_VALUE_COLOR_SEQUENTIAL_AREA = 5;
-    public static final int SENSING_METHOD_VALUE_MONOCHROME_LINEAR = 6;
-    public static final int SENSING_METHOD_VALUE_TRILINEAR = 7;
-    public static final int SENSING_METHOD_VALUE_COLOR_SEQUENTIAL_LINEAR = 8;
     public static final TagInfoDouble EXIF_TAG_STO_NITS = new TagInfoDouble("Sto Nits",
             0x923f, 1, TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
     //     skipping Maker Note!
@@ -444,9 +377,6 @@ public interface ExifTagConstants
     public static final TagInfoAscii EXIF_TAG_SUB_SEC_TIME_DIGITIZED = new TagInfoAscii(
             "Sub Sec Time Digitized", 0x9292, 1,
             TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD);
-    public static final TagInfoUndefined EXIF_TAG_IMAGE_SOURCE_DATA = new TagInfoUndefined(
-            "Image Source Data", 0x935c, 1,
-            TiffDirectoryType.EXIF_DIRECTORY_IFD0);
     public static final TagInfoUndefined EXIF_TAG_FLASHPIX_VERSION = new TagInfoUndefined(
             "Flashpix Version", 0xa000, 1,
             TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD);
@@ -969,7 +899,6 @@ public interface ExifTagConstants
                     EXIF_TAG_PREVIEW_IMAGE_LENGTH_IFD0,
                     EXIF_TAG_PREVIEW_IMAGE_LENGTH_SUB_IFD1,
                     EXIF_TAG_JPG_FROM_RAW_LENGTH_SUB_IFD2,
-                    EXIF_TAG_JPEGTABLES,
                     EXIF_TAG_PREVIEW_IMAGE_START_MAKER_NOTES,
                     EXIF_TAG_JPG_FROM_RAW_START_SUB_IFD,
                     EXIF_TAG_JPG_FROM_RAW_START_IFD2, EXIF_TAG_OTHER_IMAGE_START,
@@ -979,8 +908,7 @@ public interface ExifTagConstants
                     EXIF_TAG_APPLICATION_NOTES,
                     EXIF_TAG_MATTEING, EXIF_TAG_DATA_TYPE,
                     EXIF_TAG_IMAGE_DEPTH, EXIF_TAG_TILE_DEPTH, EXIF_TAG_MODEL_2,
-                    EXIF_TAG_CFAREPEAT_PATTERN_DIM, EXIF_TAG_CFAPATTERN_2,
-                    EXIF_TAG_BATTERY_LEVEL, EXIF_TAG_EXPOSURE_TIME,
+                    EXIF_TAG_EXPOSURE_TIME,
                     EXIF_TAG_FNUMBER, EXIF_TAG_MDFILE_TAG, EXIF_TAG_MDSCALE_PIXEL,
                     EXIF_TAG_MDCOLOR_TABLE, EXIF_TAG_MDLAB_NAME,
                     EXIF_TAG_MDSAMPLE_INFO, EXIF_TAG_MDPREP_DATE, EXIF_TAG_MDPREP_TIME,
@@ -998,12 +926,10 @@ public interface ExifTagConstants
                     EXIF_TAG_HCUSAGE, EXIF_TAG_SEMINFO, EXIF_TAG_AFCP_IPTC,
                     EXIF_TAG_MODEL_TRANSFORM, EXIF_TAG_LEAF_DATA,
                     EXIF_TAG_PHOTOSHOP_SETTINGS, EXIF_TAG_EXIF_OFFSET,
-                    EXIF_TAG_ICC_PROFILE,
                     EXIF_TAG_GEO_TIFF_DIRECTORY, EXIF_TAG_GEO_TIFF_DOUBLE_PARAMS,
                     EXIF_TAG_GEO_TIFF_ASCII_PARAMS, EXIF_TAG_EXPOSURE_PROGRAM,
                     EXIF_TAG_SPECTRAL_SENSITIVITY, EXIF_TAG_GPSINFO, EXIF_TAG_ISO,
-                    EXIF_TAG_OPTO__ELECTRIC_CONV_FACTOR, EXIF_TAG_INTERLACE,
-                    EXIF_TAG_TIME_ZONE_OFFSET, EXIF_TAG_SELF_TIMER_MODE,
+                    EXIF_TAG_OPTO_ELECTRIC_CONV_FACTOR,
                     EXIF_TAG_LEAF_SUB_IFD,
                     EXIF_TAG_EXIF_VERSION, EXIF_TAG_DATE_TIME_ORIGINAL,
                     EXIF_TAG_CREATE_DATE, EXIF_TAG_COMPONENTS_CONFIGURATION,
@@ -1012,17 +938,9 @@ public interface ExifTagConstants
                     EXIF_TAG_EXPOSURE_COMPENSATION, EXIF_TAG_MAX_APERTURE_VALUE,
                     EXIF_TAG_SUBJECT_DISTANCE, EXIF_TAG_METERING_MODE,
                     EXIF_TAG_LIGHT_SOURCE, EXIF_TAG_FLASH, EXIF_TAG_FOCAL_LENGTH,
-                    EXIF_TAG_FLASH_ENERGY, EXIF_TAG_SPATIAL_FREQUENCY_RESPONSE_1,
-                    EXIF_TAG_NOISE_1, EXIF_TAG_FOCAL_PLANE_XRESOLUTION,
-                    EXIF_TAG_FOCAL_PLANE_YRESOLUTION,
-                    EXIF_TAG_FOCAL_PLANE_RESOLUTION_UNIT,
-                    EXIF_TAG_IMAGE_NUMBER_EXIF_IFD,
-                    EXIF_TAG_SECURITY_CLASSIFICATION_EXIF_IFD,
-                    EXIF_TAG_IMAGE_HISTORY_EXIF_IFD, EXIF_TAG_SUBJECT_LOCATION_1,
-                    EXIF_TAG_EXPOSURE_INDEX, EXIF_TAG_TIFF_EPSTANDARD_ID_1,
-                    EXIF_TAG_SENSING_METHOD, EXIF_TAG_STO_NITS, EXIF_TAG_SUB_SEC_TIME,
+                    EXIF_TAG_SUBJECT_LOCATION_1,
+                    EXIF_TAG_STO_NITS, EXIF_TAG_SUB_SEC_TIME,
                     EXIF_TAG_SUB_SEC_TIME_ORIGINAL, EXIF_TAG_SUB_SEC_TIME_DIGITIZED,
-                    EXIF_TAG_IMAGE_SOURCE_DATA,
                     EXIF_TAG_FLASHPIX_VERSION,
                     EXIF_TAG_EXIF_IMAGE_WIDTH, EXIF_TAG_EXIF_IMAGE_LENGTH,
                     EXIF_TAG_RELATED_SOUND_FILE, EXIF_TAG_INTEROP_OFFSET,

Modified: commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/Tiff4TagConstants.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/Tiff4TagConstants.java?rev=1303315&r1=1303314&r2=1303315&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/Tiff4TagConstants.java
(original)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/Tiff4TagConstants.java
Wed Mar 21 08:56:18 2012
@@ -12,7 +12,7 @@ import org.apache.commons.sanselan.forma
  * <BR>
  * http://cool.conservation-us.org/bytopic/imaging/std/tiff4.html
  */
-public class Tiff4TagConstants {
+public interface Tiff4TagConstants {
     public static final TagInfoShort TIFF_TAG_COLOR_RESPONSE_UNIT = new TagInfoShort(
             "Color Response Unit", 0x12C, 1,
             TiffDirectoryType.TIFF_DIRECTORY_ROOT);

Added: commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/TiffEpTagConstants.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/TiffEpTagConstants.java?rev=1303315&view=auto
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/TiffEpTagConstants.java
(added)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/TiffEpTagConstants.java
Wed Mar 21 08:56:18 2012
@@ -0,0 +1,131 @@
+package org.apache.commons.sanselan.formats.tiff.constants;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.commons.sanselan.formats.tiff.taginfos.TagInfo;
+import org.apache.commons.sanselan.formats.tiff.taginfos.TagInfoAscii;
+import org.apache.commons.sanselan.formats.tiff.taginfos.TagInfoAsciiOrRational;
+import org.apache.commons.sanselan.formats.tiff.taginfos.TagInfoByte;
+import org.apache.commons.sanselan.formats.tiff.taginfos.TagInfoLong;
+import org.apache.commons.sanselan.formats.tiff.taginfos.TagInfoRational;
+import org.apache.commons.sanselan.formats.tiff.taginfos.TagInfoSShort;
+import org.apache.commons.sanselan.formats.tiff.taginfos.TagInfoShort;
+import org.apache.commons.sanselan.formats.tiff.taginfos.TagInfoUndefined;
+
+/**
+ * 
+ */
+public interface TiffEpTagConstants extends TiffFieldTypeConstants {
+    public static final TagInfoShort EXIF_TAG_CFAREPEAT_PATTERN_DIM = new TagInfoShort(
+            "CFARepeat Pattern Dim", 0x828d, 2,
+            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
+    
+    public static final TagInfoByte EXIF_TAG_CFAPATTERN_2 = new TagInfoByte(
+            "CFAPattern 2", 0x828e, -1,
+            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
+
+    public static final TagInfoAsciiOrRational EXIF_TAG_BATTERY_LEVEL = new TagInfoAsciiOrRational(
+            "Battery Level", 0x828f, -1,
+            TiffDirectoryType.TIFF_DIRECTORY_ROOT);
+    
+    public static final TagInfoUndefined EXIF_TAG_ICC_PROFILE = new TagInfoUndefined(
+            "ICC_Profile", 0x8773, -1,
+            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
+
+    public static final TagInfoShort EXIF_TAG_INTERLACE = new TagInfoShort(
+            "Interlace", 0x8829, 1,
+            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
+
+    public static final TagInfoSShort EXIF_TAG_TIME_ZONE_OFFSET = new TagInfoSShort(
+            "Time Zone Offset", 0x882a, -1,
+            TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD);
+
+    public static final TagInfoShort EXIF_TAG_SELF_TIMER_MODE = new TagInfoShort(
+            "Self Timer Mode", 0x882b, 1,
+            TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD);
+
+    public static final TagInfoRational EXIF_TAG_FLASH_ENERGY = new TagInfoRational(
+            "Flash Energy", 0x920b, -1,
+            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
+
+    public static final TagInfoUndefined EXIF_TAG_SPATIAL_FREQUENCY_RESPONSE_1 = new TagInfoUndefined(
+            "Spatial Frequency Response", 0x920c, -1,
+            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
+    
+    public static final TagInfoUndefined EXIF_TAG_NOISE_1 = new TagInfoUndefined(
+            "Noise", 0x920d, -1,
+            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
+    
+    public static final TagInfoRational EXIF_TAG_FOCAL_PLANE_XRESOLUTION = new TagInfoRational(
+            "Focal Plane XResolution", 0x920e, 1,
+            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
+    
+    public static final TagInfoRational EXIF_TAG_FOCAL_PLANE_YRESOLUTION = new TagInfoRational(
+            "Focal Plane YResolution", 0x920f, 1,
+            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
+    
+    public static final TagInfoShort EXIF_TAG_FOCAL_PLANE_RESOLUTION_UNIT = new TagInfoShort(
+            "Focal Plane Resolution Unit", 0x9210, 1,
+            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
+    public static final int FOCAL_PLANE_RESOLUTION_UNIT_VALUE_NONE = 1;
+    public static final int FOCAL_PLANE_RESOLUTION_UNIT_VALUE_INCHES = 2;
+    public static final int FOCAL_PLANE_RESOLUTION_UNIT_VALUE_CM = 3;
+    public static final int FOCAL_PLANE_RESOLUTION_UNIT_VALUE_MM = 4;
+    public static final int FOCAL_PLANE_RESOLUTION_UNIT_VALUE_UM = 5;
+
+    public static final TagInfoLong EXIF_TAG_IMAGE_NUMBER_EXIF_IFD = new TagInfoLong(
+            "Image Number", 0x9211, 1,
+            TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD);
+
+    public static final TagInfoAscii EXIF_TAG_SECURITY_CLASSIFICATION_EXIF_IFD = new TagInfoAscii(
+            "Security Classification", 0x9212, -1,
+            TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD);
+
+    public static final TagInfoAscii EXIF_TAG_IMAGE_HISTORY_EXIF_IFD = new TagInfoAscii(
+            "Image History", 0x9213, -1,
+            TiffDirectoryType.EXIF_DIRECTORY_EXIF_IFD);
+
+    public static final TagInfoRational EXIF_TAG_EXPOSURE_INDEX = new TagInfoRational(
+            "Exposure Index", 0x9215, -1,
+            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
+    
+    public static final TagInfoByte EXIF_TAG_TIFF_EPSTANDARD_ID_1 = new TagInfoByte(
+            "TIFF/EP Standard ID", 0x9216, 4,
+            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
+
+    public static final TagInfoShort EXIF_TAG_SENSING_METHOD = new TagInfoShort(
+            "Sensing Method", 0x9217, 1,
+            TiffDirectoryType.EXIF_DIRECTORY_UNKNOWN);
+    public static final int SENSING_METHOD_VALUE_MONOCHROME_AREA = 1;
+    public static final int SENSING_METHOD_VALUE_ONE_CHIP_COLOR_AREA = 2;
+    public static final int SENSING_METHOD_VALUE_TWO_CHIP_COLOR_AREA = 3;
+    public static final int SENSING_METHOD_VALUE_THREE_CHIP_COLOR_AREA = 4;
+    public static final int SENSING_METHOD_VALUE_COLOR_SEQUENTIAL_AREA = 5;
+    public static final int SENSING_METHOD_VALUE_MONOCHROME_LINEAR = 6;
+    public static final int SENSING_METHOD_VALUE_TRILINEAR = 7;
+    public static final int SENSING_METHOD_VALUE_COLOR_SEQUENTIAL_LINEAR = 8;
+
+    public static final List<TagInfo> ALL_TIFF_EP_TAGS =
+            Collections.unmodifiableList(Arrays.asList(
+                    EXIF_TAG_CFAREPEAT_PATTERN_DIM,
+                    EXIF_TAG_CFAPATTERN_2,
+                    EXIF_TAG_BATTERY_LEVEL,
+                    EXIF_TAG_ICC_PROFILE,
+                    EXIF_TAG_INTERLACE,
+                    EXIF_TAG_TIME_ZONE_OFFSET,
+                    EXIF_TAG_SELF_TIMER_MODE,
+                    EXIF_TAG_FLASH_ENERGY,
+                    EXIF_TAG_SPATIAL_FREQUENCY_RESPONSE_1,
+                    EXIF_TAG_NOISE_1,
+                    EXIF_TAG_FOCAL_PLANE_XRESOLUTION,
+                    EXIF_TAG_FOCAL_PLANE_YRESOLUTION,
+                    EXIF_TAG_FOCAL_PLANE_RESOLUTION_UNIT,
+                    EXIF_TAG_IMAGE_NUMBER_EXIF_IFD,
+                    EXIF_TAG_SECURITY_CLASSIFICATION_EXIF_IFD,
+                    EXIF_TAG_IMAGE_HISTORY_EXIF_IFD,
+                    EXIF_TAG_EXPOSURE_INDEX,
+                    EXIF_TAG_TIFF_EPSTANDARD_ID_1,
+                    EXIF_TAG_SENSING_METHOD));
+}

Propchange: commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/TiffEpTagConstants.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/TiffFieldTypeConstants.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/TiffFieldTypeConstants.java?rev=1303315&r1=1303314&r2=1303315&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/TiffFieldTypeConstants.java
(original)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/constants/TiffFieldTypeConstants.java
Wed Mar 21 08:56:18 2012
@@ -96,4 +96,8 @@ public interface TiffFieldTypeConstants 
     public static final List<FieldType> FIELD_TYPE_DESCRIPTION_BYTE_OR_SHORT =
             Collections.unmodifiableList(Arrays.asList(
                     FIELD_TYPE_SHORT, FIELD_TYPE_BYTE));
+    
+    public static final List<FieldType> FIELD_TYPE_DESCRIPTION_ASCII_OR_RATIONAL =
+            Collections.unmodifiableList(Arrays.asList(
+                    FIELD_TYPE_ASCII, FIELD_TYPE_RATIONAL));
 }
\ No newline at end of file

Added: commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/taginfos/TagInfoAsciiOrRational.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/taginfos/TagInfoAsciiOrRational.java?rev=1303315&view=auto
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/taginfos/TagInfoAsciiOrRational.java
(added)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/taginfos/TagInfoAsciiOrRational.java
Wed Mar 21 08:56:18 2012
@@ -0,0 +1,9 @@
+package org.apache.commons.sanselan.formats.tiff.taginfos;
+
+import org.apache.commons.sanselan.formats.tiff.constants.TiffDirectoryType;
+
+public class TagInfoAsciiOrRational extends TagInfo {
+    public TagInfoAsciiOrRational(String name, int tag, int length, TiffDirectoryType directoryType)
{
+        super(name, tag, FIELD_TYPE_DESCRIPTION_SHORT_OR_RATIONAL, length, directoryType,
false);
+    }
+}

Propchange: commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/taginfos/TagInfoAsciiOrRational.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/proper/sanselan/trunk/src/test/java/org/apache/commons/sanselan/formats/tiff/TiffTagIntegrityTest.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/test/java/org/apache/commons/sanselan/formats/tiff/TiffTagIntegrityTest.java?rev=1303315&r1=1303314&r2=1303315&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/test/java/org/apache/commons/sanselan/formats/tiff/TiffTagIntegrityTest.java
(original)
+++ commons/proper/sanselan/trunk/src/test/java/org/apache/commons/sanselan/formats/tiff/TiffTagIntegrityTest.java
Wed Mar 21 08:56:18 2012
@@ -21,25 +21,29 @@ import java.util.List;
 
 import org.apache.commons.sanselan.SanselanTest;
 import org.apache.commons.sanselan.formats.tiff.constants.AdobePageMaker6TagConstants;
+import org.apache.commons.sanselan.formats.tiff.constants.AdobePhotoshopTagConstants;
 import org.apache.commons.sanselan.formats.tiff.constants.DcfTagConstants;
 import org.apache.commons.sanselan.formats.tiff.constants.ExifTagConstants;
 import org.apache.commons.sanselan.formats.tiff.constants.GpsTagConstants;
 import org.apache.commons.sanselan.formats.tiff.constants.MicrosoftTagConstants;
 import org.apache.commons.sanselan.formats.tiff.constants.Rfc2301TagConstants;
 import org.apache.commons.sanselan.formats.tiff.constants.Tiff4TagConstants;
+import org.apache.commons.sanselan.formats.tiff.constants.TiffEpTagConstants;
 import org.apache.commons.sanselan.formats.tiff.constants.TiffTagConstants;
 import org.apache.commons.sanselan.formats.tiff.constants.WangTagConstants;
 import org.apache.commons.sanselan.formats.tiff.taginfos.TagInfo;
 
 public class TiffTagIntegrityTest extends SanselanTest {
     public void testTagIntegrity() {
-        verifyFields(AdobePageMaker6TagConstants.class, AdobePageMaker6TagConstants.ALL_ADOBE_PAGEMAKER_6_TAG_CONSTANTS);
+        verifyFields(AdobePageMaker6TagConstants.class, AdobePageMaker6TagConstants.ALL_ADOBE_PAGEMAKER_6_TAGS);
+        verifyFields(AdobePhotoshopTagConstants.class, AdobePhotoshopTagConstants.ALL_ADOBE_PHOTOSHOP_TAGS);
         verifyFields(DcfTagConstants.class, DcfTagConstants.ALL_DCF_TAGS);
         verifyFields(ExifTagConstants.class, ExifTagConstants.ALL_EXIF_TAGS);
         verifyFields(GpsTagConstants.class, GpsTagConstants.ALL_GPS_TAGS);
         verifyFields(MicrosoftTagConstants.class, MicrosoftTagConstants.ALL_MICROSOFT_TAGS);
         verifyFields(Rfc2301TagConstants.class, Rfc2301TagConstants.ALL_RFC_2301_TAGS);
         verifyFields(Tiff4TagConstants.class, Tiff4TagConstants.ALL_TIFF_4_TAGS);
+        verifyFields(TiffEpTagConstants.class, TiffEpTagConstants.ALL_TIFF_EP_TAGS);
         verifyFields(TiffTagConstants.class, TiffTagConstants.ALL_TIFF_TAGS);
         verifyFields(WangTagConstants.class, WangTagConstants.ALL_WANG_TAGS);
     }



Mime
View raw message