--- a/Depth1Image.st Wed Mar 07 20:56:13 2018 +0100
+++ b/Depth1Image.st Wed Mar 07 20:56:24 2018 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1993 by Claus Gittinger
All Rights Reserved
@@ -774,26 +776,30 @@
|clr0 clr1|
+ aColor isInteger ifTrue:[
+ ^ aColor
+ ].
+
photometric == #whiteIs0 ifTrue:[
- clr0 := Color white.
- clr1 := Color black.
+ clr0 := Color white.
+ clr1 := Color black.
] ifFalse:[
- photometric == #blackIs0 ifTrue:[
- clr0 := Color black.
- clr1 := Color white.
- ] ifFalse:[
- photometric ~~ #palette ifTrue:[
- ^ super valueFromColor:aColor
- ].
- clr0 := colorMap at:1.
- clr1 := colorMap at:2 ifAbsent:nil.
- ]
+ photometric == #blackIs0 ifTrue:[
+ clr0 := Color black.
+ clr1 := Color white.
+ ] ifFalse:[
+ photometric ~~ #palette ifTrue:[
+ ^ super valueFromColor:aColor
+ ].
+ clr0 := colorMap at:1.
+ clr1 := colorMap at:2 ifAbsent:nil.
+ ]
].
aColor = clr0 ifTrue:[
- ^ 0.
+ ^ 0.
].
aColor = clr1 ifTrue:[
- ^ 1
+ ^ 1
].
"