--- a/Depth1Image.st Sat Jun 08 13:08:10 1996 +0200
+++ b/Depth1Image.st Sat Jun 08 13:09:57 1996 +0200
@@ -82,22 +82,24 @@
byte := bytes at:(lineIndex + (x // 8)).
shift := #(-7 -6 -5 -4 -3 -2 -1 0) at:((x \\ 8) + 1).
value := (byte bitShift:shift) bitAnd:1.
+
(p := photometric) == #whiteIs0 ifTrue:[
- value := 1-value.
- p := #blackIs0
+ value := 1-value.
+ p := #blackIs0
].
p == #blackIs0 ifTrue:[
- (value == 0) ifTrue:[
- ^ Color black
- ].
- ^ Color white
+ (value == 0) ifTrue:[
+ ^ Color black
+ ].
+ ^ Color white
].
p ~~ #palette ifTrue:[
- self error:'format not supported'.
- ^ nil
+ ^ self colorFromValue:value
].
value := value + 1.
^ colorMap at:value
+
+ "Modified: 8.6.1996 / 10:52:15 / cg"
!
atX:x y:y put:aColor
@@ -322,7 +324,7 @@
mask "{ Class: SmallInteger }"
x1 "{ Class: SmallInteger }"
x2 "{ Class: SmallInteger }"
- color0 color1 color|
+ color0 color1|
x1 := xLow.
x2 := xHigh.
@@ -342,8 +344,7 @@
color0 := colorMap at:1.
color1 := colorMap at:2
] ifFalse:[
- self error:'format not supported'.
- ^ nil
+ ^ super colorsAtY:y from:xLow to:xHigh do:aBlock.
]
]
].
@@ -376,8 +377,8 @@
]
]
- "Modified: 7.6.1996 / 18:52:23 / cg"
"Created: 7.6.1996 / 19:12:26 / cg"
+ "Modified: 8.6.1996 / 10:16:34 / cg"
!
valuesAtY:y from:xLow to:xHigh do:aBlock
@@ -608,5 +609,5 @@
!Depth1Image class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/Depth1Image.st,v 1.21 1996-06-07 17:31:04 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/Depth1Image.st,v 1.22 1996-06-08 11:09:57 cg Exp $'
! !