checkin from browser
authorClaus Gittinger <cg@exept.de>
Sat, 08 Jun 1996 13:42:19 +0200
changeset 807 c1b1e1d029fe
parent 806 8d8a58e12c08
child 808 f548a3c6ca8c
checkin from browser
Depth24Image.st
--- a/Depth24Image.st	Sat Jun 08 13:38:53 1996 +0200
+++ b/Depth24Image.st	Sat Jun 08 13:42:19 1996 +0200
@@ -151,6 +151,11 @@
      w               "{Class: SmallInteger }"
      h               "{Class: SmallInteger }"|
 
+    photometric ~~ #rgb ifTrue:[
+        self error:'invalid format'.
+        ^ nil
+    ].
+
     nDither := ditherMatrix size.
     dH := nDither / dW.
 
@@ -165,12 +170,6 @@
         ^ nil
     ].
 
-    greyMap := ByteArray new:256.
-    photometric ~~ #rgb ifTrue:[
-        self error:'invalid format'.
-        ^ nil
-    ].
-
 %{
     int __dW = __intVal(dW);
     int __dH = __intVal(dH);
@@ -194,7 +193,6 @@
     char *__monoBits = __ByteArrayInstPtr(monoBits)->ba_element;
     char *__ditherMatrix = __ByteArrayInstPtr(ditherMatrix)->ba_element;
     unsigned char *__bytes = __ByteArrayInstPtr(__INST(bytes))->ba_element;
-    unsigned char *__greyMap = __ByteArrayInstPtr(greyMap)->ba_element;
 
     __oY = __dY = 0;
     for (__y=0; __y<__h; __y++) {
@@ -1915,5 +1913,5 @@
 !Depth24Image class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Depth24Image.st,v 1.27 1996-06-08 11:09:27 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Depth24Image.st,v 1.28 1996-06-08 11:42:19 cg Exp $'
 ! !