#BUGFIX by cg
authorClaus Gittinger <cg@exept.de>
Tue, 22 Aug 2017 18:36:15 +0200
changeset 8090 c475e87d7578
parent 8089 9a9ae8e56007
child 8091 e3a77cae0843
#BUGFIX by cg class: Depth24Image changed: #rgbFromValue: #valueFromRedBits:greenBits:blueBits:
Depth24Image.st
--- a/Depth24Image.st	Tue Aug 22 18:36:11 2017 +0200
+++ b/Depth24Image.st	Tue Aug 22 18:36:15 2017 +0200
@@ -3409,7 +3409,12 @@
 rgbFromValue:pixelValue
     "given a pixel value, return the corresponding 24bit rgbValue (rrggbb, red is MSB)."
 
-    ^ pixelValue
+    (photometric == #rgb) ifTrue:[
+        ^ pixelValue
+    ].
+    ^ super rgbFromValue:pixelValue.
+
+    "Modified: / 22-08-2017 / 18:32:42 / cg"
 !
 
 samplesPerPixel
@@ -3422,7 +3427,12 @@
 !
 
 valueFromRedBits:redBits greenBits:greenBits blueBits:blueBits
-    ^ (((redBits bitShift:8) bitOr:greenBits) bitShift:8) bitOr:blueBits
+    (photometric == #rgba) ifTrue:[
+        ^ (((redBits bitShift:8) bitOr:greenBits) bitShift:8) bitOr:blueBits
+    ].
+    ^ super valueFromRedBits:redBits greenBits:greenBits blueBits:blueBits.
+
+    "Modified: / 22-08-2017 / 18:34:07 / cg"
 ! !
 
 !Depth24Image class methodsFor:'documentation'!