SunRasterReader.st
changeset 1745 4fa0fad2a463
parent 918 64336276b146
child 1759 f52382e5a9b8
--- a/SunRasterReader.st	Thu Apr 10 13:21:46 2003 +0200
+++ b/SunRasterReader.st	Thu Apr 10 16:26:11 2003 +0200
@@ -10,11 +10,13 @@
  hereby transferred.
 "
 
+"{ Package: 'stx:libview2' }"
+
 ImageReader subclass:#SunRasterReader
 	instanceVariableNames:''
 	classVariableNames:''
 	poolDictionaries:''
-	category:'Graphics-Images-Support'
+	category:'Graphics-Images-Readers'
 !
 
 !SunRasterReader class methodsFor:'documentation'!
@@ -148,12 +150,10 @@
 
     depth = 8 ifTrue: [
         mapLen := (mapBytes // 3).
-        rMap := ByteArray uninitializedNew:mapLen.
-        gMap := ByteArray uninitializedNew:mapLen.
-        bMap := ByteArray uninitializedNew:mapLen.
-        aStream nextBytes:mapLen into:rMap.
-        aStream nextBytes:mapLen into:gMap.
-        aStream nextBytes:mapLen into:bMap.
+        rMap := aStream nextBytes:mapLen.
+        gMap := aStream nextBytes:mapLen.
+        bMap := aStream nextBytes:mapLen.
+        colorMap := Colormap redVector:rMap greenVector:gMap blueVector:bMap.
 
         data := ByteArray uninitializedNew:(width * height).
         aStream nextBytes:(width * height) into:data.
@@ -161,7 +161,7 @@
         photometric := #palette.
         samplesPerPixel := 1.
         bitsPerSample := #(8).
-        colorMap := Colormap redVector:rMap greenVector:gMap blueVector:bMap.
+
         ^ self
     ].
     depth ~~ 1 ifTrue: [
@@ -276,6 +276,7 @@
 !SunRasterReader class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/SunRasterReader.st,v 1.27 1998-05-11 20:50:54 tz Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/SunRasterReader.st,v 1.28 2003-04-10 14:26:11 cg Exp $'
 ! !
+
 SunRasterReader initialize!