#OTHER by cg
authorClaus Gittinger <cg@exept.de>
Thu, 12 Oct 2017 16:49:58 +0200
changeset 8196 a3facd01e98d
parent 8195 d6c2e6ed4cae
child 8197 ac41cb09e3f6
#OTHER by cg lazy create pixel storage (in atX:y:put:)
Depth2Image.st
--- a/Depth2Image.st	Thu Oct 12 16:49:56 2017 +0200
+++ b/Depth2Image.st	Thu Oct 12 16:49:58 2017 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1993 by Claus Gittinger
 	      All Rights Reserved
@@ -104,6 +102,8 @@
      byte      "{ Class: SmallInteger }"
      shift     "{ Class: SmallInteger }" |
 
+    bytes isNil ifTrue:[ self createPixelStore ].
+
     lineIndex := (self bytesPerRow * y) + 1.
 
     "left pixel is in high bits"