--- a/XPMReader.st Wed Nov 26 16:03:11 2003 +0100
+++ b/XPMReader.st Wed Nov 26 16:33:54 2003 +0100
@@ -541,7 +541,14 @@
|usedColors nColorsUsed nColors nChars map maskColorIndex
isMasked imageMask|
- usedColors := image usedColors asArray.
+ usedColors := image usedColorsMax:4096.
+ usedColors isNil ifTrue:[
+ ^ Image cannotRepresentImageSignal
+ raiseWith:image
+ errorString:('XPMReader cannot represent this image (too many colors)').
+ ].
+
+ usedColors := usedColors asArray.
nColors := nColorsUsed := usedColors size.
(imageMask := image mask) notNil ifTrue:[
nColors := nColors + 1.
@@ -624,7 +631,7 @@
!XPMReader class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/XPMReader.st,v 1.58 2003-11-19 15:38:24 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/XPMReader.st,v 1.59 2003-11-26 15:33:54 cg Exp $'
! !
XPMReader initialize!