--- a/Image.st Thu Feb 23 14:18:00 2017 +0100
+++ b/Image.st Thu Feb 23 15:55:50 2017 +0100
@@ -14410,16 +14410,19 @@
].
photometric == #whiteIs0 ifTrue:[
+ samplesPerPixel isNil ifTrue:[self breakPoint:#cg. samplesPerPixel := 1].
maxPixel := (1 bitShift:self bitsPerPixel) - 1.
^ maxPixel - (color brightness * maxPixel) rounded.
].
photometric == #blackIs0 ifTrue:[
+ samplesPerPixel isNil ifTrue:[self breakPoint:#cg. samplesPerPixel := 1].
maxPixel := (1 bitShift:self bitsPerPixel) - 1.
^ (color brightness * maxPixel) rounded.
].
photometric == #palette ifTrue:[
+ samplesPerPixel isNil ifTrue:[self breakPoint:#cg. samplesPerPixel := 1].
colorMap isNil ifTrue:[
"/ same as blackIs0
maxPixel := (1 bitShift:self bitsPerPixel) - 1.
@@ -14437,6 +14440,7 @@
].
photometric == #rgb ifTrue:[
+ samplesPerPixel isNil ifTrue:[self breakPoint:#cg. samplesPerPixel := 3].
samplesPerPixel >= 3 ifTrue:[
redBits := bitsPerSample at:1.
greenBits := bitsPerSample at:2.
@@ -14452,6 +14456,7 @@
].
photometric == #rgba ifTrue:[
+ samplesPerPixel isNil ifTrue:[self breakPoint:#cg. samplesPerPixel := 4].
samplesPerPixel >= 4 ifTrue:[
redBits := bitsPerSample at:1.
greenBits := bitsPerSample at:2.
@@ -14470,7 +14475,7 @@
ImageErrorSignal raiseErrorString:'format not supported'.
^ nil
- "Modified: / 06-06-2007 / 11:26:15 / cg"
+ "Modified: / 23-02-2017 / 15:55:29 / cg"
!
valueFromRGB:rgb