#DOCUMENTATION by exept
class: Depth16Image
comment/format in:
#rowAt:putAll:startingAt:
#valueFromRGB:
--- 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."