--- a/TIFFRdr.st Fri Jan 31 10:40:39 1997 +0100
+++ b/TIFFRdr.st Fri Jan 31 10:51:54 1997 +0100
@@ -320,7 +320,17 @@
].
(tagType == 274) ifTrue:[
"Orientation"
- orientation:= value.
+
+ orientation :=
+ #( nil "/ 1 normal
+ unsupported "/ 2 horizontal flip
+ unsupported "/ 3 horizontal & vertical flip
+ vFlip "/ 4 vertical flip
+ unsupported "/ 5 rot 90' counter clock-wise
+ unsupported "/ 6 rot 90' clock-wise
+ unsupported "/ 7 rot 90' & flip
+ unsupported "/ 8 rot 90' ccw & flip
+ ) at:value ifAbsent:#unsupported.
"/ 'orientation ' print. value printNewline.
@@ -684,7 +694,7 @@
"/
'TIFFReader [warning]: unknown tag type ' errorPrint. tagType errorPrintCR
- "Modified: 31.1.1997 / 10:23:44 / cg"
+ "Modified: 31.1.1997 / 10:50:38 / cg"
!
readCCITT3RLETiffImageData
@@ -1585,8 +1595,8 @@
' not known' errorPrintCR
].
- orientation == 4 ifTrue:[
- "/ bottom-to-top; reverse rows to top-to bottom
+ orientation == #vFlip ifTrue:[
+ "/ reverse rows to top-to bottom
bytesPerRow := self bytesPerRow.
tmp := ByteArray new:bytesPerRow.
@@ -1603,10 +1613,13 @@
offset2 := offset2 - bytesPerRow.
].
].
+ orientation == #unsupported ifTrue:[
+ 'TIFFReader [warning]: unsupported orientation' errorPrintCR
+ ].
^ result
- "Modified: 31.1.1997 / 10:39:55 / cg"
+ "Modified: 31.1.1997 / 10:51:27 / cg"
! !
!TIFFReader methodsFor:'writing to file'!
@@ -1704,6 +1717,6 @@
!TIFFReader class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/Attic/TIFFRdr.st,v 1.46 1997-01-31 09:40:39 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/Attic/TIFFRdr.st,v 1.47 1997-01-31 09:51:54 cg Exp $'
! !
TIFFReader initialize!
--- a/TIFFReader.st Fri Jan 31 10:40:39 1997 +0100
+++ b/TIFFReader.st Fri Jan 31 10:51:54 1997 +0100
@@ -320,7 +320,17 @@
].
(tagType == 274) ifTrue:[
"Orientation"
- orientation:= value.
+
+ orientation :=
+ #( nil "/ 1 normal
+ unsupported "/ 2 horizontal flip
+ unsupported "/ 3 horizontal & vertical flip
+ vFlip "/ 4 vertical flip
+ unsupported "/ 5 rot 90' counter clock-wise
+ unsupported "/ 6 rot 90' clock-wise
+ unsupported "/ 7 rot 90' & flip
+ unsupported "/ 8 rot 90' ccw & flip
+ ) at:value ifAbsent:#unsupported.
"/ 'orientation ' print. value printNewline.
@@ -684,7 +694,7 @@
"/
'TIFFReader [warning]: unknown tag type ' errorPrint. tagType errorPrintCR
- "Modified: 31.1.1997 / 10:23:44 / cg"
+ "Modified: 31.1.1997 / 10:50:38 / cg"
!
readCCITT3RLETiffImageData
@@ -1585,8 +1595,8 @@
' not known' errorPrintCR
].
- orientation == 4 ifTrue:[
- "/ bottom-to-top; reverse rows to top-to bottom
+ orientation == #vFlip ifTrue:[
+ "/ reverse rows to top-to bottom
bytesPerRow := self bytesPerRow.
tmp := ByteArray new:bytesPerRow.
@@ -1603,10 +1613,13 @@
offset2 := offset2 - bytesPerRow.
].
].
+ orientation == #unsupported ifTrue:[
+ 'TIFFReader [warning]: unsupported orientation' errorPrintCR
+ ].
^ result
- "Modified: 31.1.1997 / 10:39:55 / cg"
+ "Modified: 31.1.1997 / 10:51:27 / cg"
! !
!TIFFReader methodsFor:'writing to file'!
@@ -1704,6 +1717,6 @@
!TIFFReader class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/TIFFReader.st,v 1.46 1997-01-31 09:40:39 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/TIFFReader.st,v 1.47 1997-01-31 09:51:54 cg Exp $'
! !
TIFFReader initialize!