commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dam...@apache.org
Subject svn commit: r1325114 - in /commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff: TiffImageParser.java constants/ExifTagConstants.java
Date Thu, 12 Apr 2012 03:56:35 GMT
Author: damjan
Date: Thu Apr 12 03:56:34 2012
New Revision: 1325114

URL: http://svn.apache.org/viewvc?rev=1325114&view=rev
Log:
Add the Software TIFF tag, and get the byte order after reading the first TIFF directory.
Submitted by: Piyush Kapoor <pkapoor at adobe dot com>
Jira issue key: SANSELAN-71


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/ExifTagConstants.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=1325114&r1=1325113&r2=1325114&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
Thu Apr 12 03:56:34 2012
@@ -455,8 +455,8 @@ public class TiffImageParser extends Ima
     {
         FormatCompliance formatCompliance = FormatCompliance.getDefault();
         TiffReader reader = new TiffReader(isStrict(params));
-        int byteOrder = reader.getByteOrder();
         TiffContents contents = reader.readFirstDirectory(byteSource, params, true, formatCompliance);
+        int byteOrder = reader.getByteOrder();
         TiffDirectory directory = contents.directories.get(0);
         BufferedImage result = directory.getTiffImage(byteOrder, params);
         if (null == result)

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=1325114&r1=1325113&r2=1325114&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
Thu Apr 12 03:56:34 2012
@@ -57,6 +57,9 @@ public interface ExifTagConstants
     public static final TagInfoAscii EXIF_TAG_PROCESSING_SOFTWARE = new TagInfoAscii(
             "Processing Software", 0x000b, 1,
             TiffDirectoryType.EXIF_DIRECTORY_IFD0);
+    public static final TagInfoAscii EXIF_TAG_SOFTWARE = new TagInfoAscii("Software",
+			0x0131, 1,
+            TiffDirectoryType.EXIF_DIRECTORY_IFD0);
     public static final TagInfoLong EXIF_TAG_PREVIEW_IMAGE_START_IFD0 = new TagInfoLong(
             "Preview Image Start", 0x0111, 1,
             TiffDirectoryType.EXIF_DIRECTORY_IFD0, true);
@@ -517,6 +520,7 @@ public interface ExifTagConstants
             Collections.unmodifiableList(Arrays.asList(
                     EXIF_TAG_INTEROP_INDEX, EXIF_TAG_INTEROP_VERSION,
                     EXIF_TAG_PROCESSING_SOFTWARE,
+                    EXIF_TAG_SOFTWARE,
                     EXIF_TAG_PREVIEW_IMAGE_START_IFD0,
                     EXIF_TAG_PREVIEW_IMAGE_START_SUB_IFD1,
                     EXIF_TAG_JPG_FROM_RAW_START_SUB_IFD2,



Mime
View raw message