#DOCUMENTATION by exept
authorClaus Gittinger <cg@exept.de>
Sun, 04 Aug 2019 22:17:02 +0200
changeset 8757 5410e9509f3c
parent 8756 731ac340b5cf
child 8758 c8ffbed1d428
#DOCUMENTATION by exept class: Depth16Image comment/format in: #rowAt:putAll:startingAt: #valueFromRGB:
Depth16Image.st
--- a/Depth16Image.st	Sun Aug 04 13:34:17 2019 +0200
+++ b/Depth16Image.st	Sun Aug 04 22:17:02 2019 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1995 by Claus Gittinger
 	      All Rights Reserved
@@ -125,6 +127,7 @@
     1 to:width do:[:col |
         pixel := pixelArray at:srcIdx.
         "/ msbFirst
+        "/ bytes unsignedInt16At:dstIdx put:pixel MSB:true.
         bytes at:dstIdx put:((pixel bitShift:-8) bitAnd:16rFF).
         bytes at:dstIdx+1 put:(pixel bitAnd:16rFF).
         dstIdx := dstIdx + 2.
@@ -207,7 +210,7 @@
 !
 
 valueFromRGB:rgb
-    "given a color as rgb-value, with 8 bits per component, 
+    "given a color as rgb-value, with 8 bits per component and r in high 8 bits, 
      return the corresponding pixel value.
      The red component is in the high 8 bits.
      Non-representable colors return nil."