--- a/PCXReader.st Mon Apr 28 11:18:06 2003 +0200
+++ b/PCXReader.st Mon Apr 28 12:16:30 2003 +0200
@@ -120,29 +120,7 @@
|rawMap|
rawMap := header copyFrom:17 to:(17 + (16*3) - 1).
- ^ Colormap rgbVector:rawMap
-
-"/ |rawMap srcIndex rMap gMap bMap|
-"/
-"/ rawMap := ByteArray uninitializedNew:(16*3).
-"/ rawMap replaceFrom:1 to:(16*3) with:header startingAt:17.
-"/ rMap := ByteArray new:16.
-"/ gMap := ByteArray new:16.
-"/ bMap := ByteArray new:16.
-"/ srcIndex := 1.
-"/ 1 to:16 do:[:i |
-"/ |r g b|
-"/
-"/ r := rawMap at:srcIndex.
-"/ g := rawMap at:srcIndex+1.
-"/ b := rawMap at:srcIndex+2.
-"/
-"/ rMap at:i put:r.
-"/ gMap at:i put:g.
-"/ bMap at:i put:b.
-"/ srcIndex := srcIndex + 3.
-"/ ].
-"/ ^ Colormap redVector:rMap greenVector:gMap blueVector:bMap.
+ ^ Colormap rgbBytesVector:rawMap
!
nextByteFromBufferOrStream
@@ -158,7 +136,7 @@
!
readColorMap256
- |rawMap mapSize rMap gMap bMap srcIndex|
+ |rawMap mapSize|
rawMap := ByteArray uninitializedNew:(256*3).
nBuffer ~~ 0 ifTrue:[
@@ -172,27 +150,7 @@
inStream nextBytes:(256*3) into:rawMap.
].
- ^ Colormap rgbVector:rawMap
-
-"/ rMap := Array new:256.
-"/ gMap := Array new:256.
-"/ bMap := Array new:256.
-"/ srcIndex := 1.
-"/
-"/ 1 to:256 do:[:i |
-"/ |r g b|
-"/
-"/ r := rawMap at:srcIndex.
-"/ g := rawMap at:srcIndex+1.
-"/ b := rawMap at:srcIndex+2.
-"/
-"/ rMap at:i put:r.
-"/ gMap at:i put:g.
-"/ bMap at:i put:b.
-"/ srcIndex := srcIndex + 3.
-"/ ].
-"/
-"/ ^ Colormap redVector:rMap greenVector:gMap blueVector:bMap.
+ ^ Colormap rgbBytesVector:rawMap
!
readCompressedData
@@ -400,7 +358,7 @@
!PCXReader class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/PCXReader.st,v 1.28 2003-04-10 14:25:57 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/PCXReader.st,v 1.29 2003-04-28 10:16:30 cg Exp $'
! !
PCXReader initialize!