--- a/XPMReader.st Thu Jul 17 12:09:13 1997 +0200
+++ b/XPMReader.st Tue Jul 22 10:33:03 1997 +0200
@@ -446,9 +446,14 @@
nChars := 1.
nColors > map size ifTrue:[
- ^ Image cannotRepresentImageSignal
- raiseWith:image
- errorString:('XPMReader cannot represent this image (too many colors)').
+"/ ^ Image cannotRepresentImageSignal
+"/ raiseWith:image
+"/ errorString:('XPMReader cannot represent this image (too many colors)').
+ map := OrderedCollection new.
+ ($a to: $j) do:[:c1 |
+ map addAll:(($a to: $z) collect:[:c2 | c1 asString , c2 asString]).
+ ].
+ nChars := 2.
].
outStream := FileStream newFileNamed:aFileName.
@@ -498,11 +503,11 @@
isMasked := (imageMask pixelAtX:x y:y) == 0
].
isMasked ifTrue:[
- outStream nextPut:(map at:maskColorIndex)
+ outStream nextPutAll:(map at:maskColorIndex) asString
] ifFalse:[
clr := image colorAtX:x y:y.
idx := usedColors indexOf:clr.
- outStream nextPut:(map at:idx)
+ outStream nextPutAll:(map at:idx) asString
]
].
outStream nextPutLine:'",'.
@@ -510,12 +515,12 @@
outStream nextPutLine:'};'.
outStream close.
- "Modified: 24.4.1997 / 21:33:03 / cg"
+ "Modified: 22.7.1997 / 10:30:27 / cg"
! !
!XPMReader class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/XPMReader.st,v 1.34 1997-06-30 20:56:41 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/XPMReader.st,v 1.35 1997-07-22 08:33:03 cg Exp $'
! !
XPMReader initialize!