#BUGFIX by cg
authorClaus Gittinger <cg@exept.de>
Mon, 22 Jul 2019 14:03:36 +0200
changeset 8746 0338514ca23d
parent 8745 2ebd0e6febc9
child 8747 e84ae8a44b8d
#BUGFIX by cg class: Depth32Image changed: #valueFromColor: #valueFromRGB:
Depth32Image.st
--- a/Depth32Image.st	Mon Jul 22 13:57:21 2019 +0200
+++ b/Depth32Image.st	Mon Jul 22 14:03:36 2019 +0200
@@ -338,7 +338,7 @@
     ((photometric == #rgb) or:[photometric == #rgbx]) ifTrue:[
         "/ byteorder is: r,g,b,ignored-alpha
         "/ but the pixelvalue is assumed to be MSB (i.e. red at high byte)
-        ^ ((((r bitShift:8) bitOr:g) bitShift:8) bitOr:b) bitShift:8.
+        ^ (((r bitShift:8) bitOr:g) bitShift:8) bitOr:b.
     ].
     a := aColor alphaByte.
     (photometric == #rgba) ifTrue:[
@@ -376,7 +376,7 @@
     ((photometric == #rgb) or:[photometric == #rgbx]) ifTrue:[
         "/ byteorder is: r,g,b,ignored-alpha
         "/ but the pixelvalue is assumed to be MSB (i.e. red at high byte)
-        ^ anRGBValue bitShift:8.
+        ^ anRGBValue.
     ].
     (photometric == #rgba) ifTrue:[
         "/ byteorder is: r,g,b,a
@@ -391,7 +391,7 @@
     (photometric == #xrgb) ifTrue:[
         "/ byteorder is: ignored-alpha,r,g,b
         "/ but the pixelvalue is assumed to be MSB (i.e. red at high byte)
-        ^ anRGBValue.
+        ^ anRGBValue bitShift:8.
     ].
 
     ^ super valueFromRGB:anRGBValue.