some tiff files seem to have no stripByteCounts - but use a single strip.
authorClaus Gittinger <cg@exept.de>
Wed, 22 Nov 1995 13:06:32 +0100
changeset 117 c0641e5d21e6
parent 116 8a11ebd8ca8b
child 118 7f0415d8308d
some tiff files seem to have no stripByteCounts - but use a single strip.
TIFFRdr.st
TIFFReader.st
--- a/TIFFRdr.st	Tue Nov 21 15:01:56 1995 +0100
+++ b/TIFFRdr.st	Wed Nov 22 13:06:32 1995 +0100
@@ -40,7 +40,7 @@
 !
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/Attic/TIFFRdr.st,v 1.25 1995-11-11 16:05:10 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/Attic/TIFFRdr.st,v 1.26 1995-11-22 12:06:32 cg Exp $'
 !
 
 documentation
@@ -199,6 +199,17 @@
 	ok := false
     ].
 
+    stripByteCounts isNil ifTrue:[
+	stripOffsets size == 1 ifTrue:[
+	    stripByteCounts := Array with:(self bitsPerPixel // 8) * width * height
+	]
+    ].
+
+    stripByteCounts isNil ifTrue:[
+	'TIFFReader: missing stripByteCounts tag' errorPrintNL.
+	ok := false
+    ].
+
     ok ifFalse:[
 	^ nil
     ].
--- a/TIFFReader.st	Tue Nov 21 15:01:56 1995 +0100
+++ b/TIFFReader.st	Wed Nov 22 13:06:32 1995 +0100
@@ -40,7 +40,7 @@
 !
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/TIFFReader.st,v 1.25 1995-11-11 16:05:10 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/TIFFReader.st,v 1.26 1995-11-22 12:06:32 cg Exp $'
 !
 
 documentation
@@ -199,6 +199,17 @@
 	ok := false
     ].
 
+    stripByteCounts isNil ifTrue:[
+	stripOffsets size == 1 ifTrue:[
+	    stripByteCounts := Array with:(self bitsPerPixel // 8) * width * height
+	]
+    ].
+
+    stripByteCounts isNil ifTrue:[
+	'TIFFReader: missing stripByteCounts tag' errorPrintNL.
+	ok := false
+    ].
+
     ok ifFalse:[
 	^ nil
     ].