Depth24Image.st
changeset 38 2652fc96e660
parent 35 f1a194c18429
child 46 7b331e9012fd
--- a/Depth24Image.st	Wed Mar 30 03:25:26 1994 +0200
+++ b/Depth24Image.st	Wed Mar 30 12:13:08 1994 +0200
@@ -23,7 +23,7 @@
 
 this class represents truecolor (24 bit / pixel) images
 
-$Header: /cvs/stx/stx/libview/Depth24Image.st,v 1.3 1994-02-25 13:10:20 claus Exp $
+$Header: /cvs/stx/stx/libview/Depth24Image.st,v 1.4 1994-03-30 10:11:45 claus Exp $
 
 written summer 93 by claus
 '!
@@ -66,7 +66,8 @@
      Pixels start at x=0 , y=0 for upper left pixel, end at
      x = width-1, y=height-1 for lower right pixel"
 
-    |index rVal gVal bVal|
+    |index "{ Class: SmallInteger }"
+     rVal gVal bVal|
 
     index := 1 + (((width * y) + x) * 3).
     rVal := bytes at:(index).
@@ -873,8 +874,7 @@
                     blueArray at:b put:true.
                     nColors := nColors + 1.
                     (nColors > nColorCells) ifTrue:[
-                        'more than ' print. nColorCells print. 
-                        ' colors' printNewline.
+                        'D24IMAGE: more than ' errorPrint. nColorCells errorPrint. ' colors' errorPrintNewline.
                         srcIndex := dataSize + 1
                     ]
                 ]
@@ -893,12 +893,15 @@
                     gMask := (gMask bitShift:1) bitAnd:2r11111111.
                     bMask := (bMask bitShift:1) bitAnd:2r11111111
                 ].
+                'D24IMAGE: retry with less color resolution' errorPrintNewline.
+"
     'masks:' print. rMask print. ' ' print. gMask print. ' ' print.
     bMask printNewline
+"
             ]
         ].
 
-        nColors print. ' colors used' printNewline.
+       'D24IMAGE: ' errorPrint. nColors errorPrint. ' colors used' errorPrintNewline.
         colors := Array new:nColors.
         colorIndex := 1.
 
@@ -940,7 +943,7 @@
         "again with less color bits if we didnt get all colors"
 
         fit ifFalse:[
-           'still no fit' printNewline.
+           'D24IMAGE: still no fit' errorPrintNewline.
 
             "free the allocated colors"
             colors atAllPut:nil.
@@ -1092,7 +1095,7 @@
             _dstP[0] = sP[0];
             _dstP[1] = sP[1];
             _dstP[2] = sP[2];
-	    _dstP += 3;
+            _dstP += 3;
         }
     }
 %}