commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dam...@apache.org
Subject svn commit: r1296641 - /commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/TiffReader.java
Date Sat, 03 Mar 2012 15:35:29 GMT
Author: damjan
Date: Sat Mar  3 15:35:29 2012
New Revision: 1296641

URL: http://svn.apache.org/viewvc?rev=1296641&view=rev
Log:
Revert the previous patch which was committed by accident.


Modified:
    commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/TiffReader.java

Modified: commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/TiffReader.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/TiffReader.java?rev=1296641&r1=1296640&r2=1296641&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/TiffReader.java
(original)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/commons/sanselan/formats/tiff/TiffReader.java
Sat Mar  3 15:35:29 2012
@@ -478,18 +478,9 @@ public class TiffReader extends BinaryFi
         {
             TiffField rowsPerStripField = directory
                     .findField(TiffTagConstants.TIFF_TAG_ROWS_PER_STRIP);
-            int rowsPerStrip ; 
-
-            if (null != rowsPerStripField) {
-                rowsPerStrip = rowsPerStripField.getIntValue();
-            } else {
-                TiffField imageHeight = directory.findField(TiffTagConstants.TIFF_TAG_IMAGE_LENGTH);
-                /**
-                 * if rows per strip not present then rowsPerStrip 
-                 * is equal to imageLength or an infinity value;
-                 */
-                rowsPerStrip = imageHeight.getIntValue();           
-            }
+            if (null == rowsPerStripField)
+                throw new ImageReadException("Can't find rows per strip field.");
+            int rowsPerStrip = rowsPerStripField.getIntValue();
 
             return new TiffImageData.Strips(data, rowsPerStrip);
         } else



Mime
View raw message