#BUGFIX by Stefan Reise
authorsr
Fri, 12 Jul 2019 15:21:15 +0200
changeset 8728 289cdc983b33
parent 8727 8af37d3caf22
child 8729 ac6b7e021151
#BUGFIX by Stefan Reise class: Depth32Image changed: #colorAtX:y:
Depth32Image.st
--- a/Depth32Image.st	Fri Jul 12 14:49:42 2019 +0200
+++ b/Depth32Image.st	Fri Jul 12 15:21:15 2019 +0200
@@ -114,11 +114,11 @@
      rVal gVal bVal aVal|
 
     index := 1 + (((width * y) + x) * 4).
-    ((photometric == #rgb) or:[photometric == #xrgb]) ifTrue:[
-        "/ byteorder is: <ignoredAlpha>,r,g,b
-        rVal := bytes at:(index + 1).
-        gVal := bytes at:(index + 2).
-        bVal := bytes at:(index + 3).
+    ((photometric == #rgb) or:[photometric == #rgbx]) ifTrue:[
+        "/ byteorder is: r,g,b,<ignoredAlpha>
+        rVal := bytes at:index.
+        gVal := bytes at:(index + 1).
+        bVal := bytes at:(index + 2).
         ^ Color redByte:rVal greenByte:gVal blueByte:bVal
     ].
     (photometric == #rgba) ifTrue:[
@@ -148,6 +148,7 @@
     ^ super colorAtX:x y:y.
 
     "Modified: / 22-08-2017 / 18:17:38 / cg"
+    "Modified: / 12-07-2019 / 14:39:41 / Stefan Reise"
 !
 
 colorAtX:x y:y put:aColor