# HG changeset patch # User Claus Gittinger # Date 998498324 -7200 # Node ID 100e4e782f71a31e6fb1a4b7ae32f541a27f8cf9 # Parent e102a848db7d8a6d81298c50941145cebe124c07 *** empty log message *** diff -r e102a848db7d -r 100e4e782f71 XBMReader.st --- a/XBMReader.st Tue Aug 21 17:52:31 2001 +0200 +++ b/XBMReader.st Wed Aug 22 18:38:44 2001 +0200 @@ -10,6 +10,8 @@ hereby transferred. " +"{ Package: 'stx:libview2' }" + ImageReader subclass:#XBMReader instanceVariableNames:'' classVariableNames:'' @@ -72,8 +74,10 @@ |photometric clr0 clr1| (anImage depth ~~ 1) ifTrue:[^ false.]. - (photometric := anImage photometric) == #blackIs0 ifTrue:[^ true]. - photometric == #whiteIs0 ifTrue:[^ true]. + + photometric := anImage photometric. + ((photometric == #blackIs0) or:[photometric == #whiteIs0]) ifTrue:[^ true]. + photometric == #palette ifTrue:[ clr0 := anImage colorFromValue:0. clr1 := anImage colorFromValue:1. @@ -341,6 +345,6 @@ !XBMReader class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libview2/XBMReader.st,v 1.41 1999-03-18 10:28:23 cg Exp $' + ^ '$Header: /cvs/stx/stx/libview2/XBMReader.st,v 1.42 2001-08-22 16:38:44 cg Exp $' ! ! XBMReader initialize! diff -r e102a848db7d -r 100e4e782f71 XPMReader.st --- a/XPMReader.st Tue Aug 21 17:52:31 2001 +0200 +++ b/XPMReader.st Wed Aug 22 18:38:44 2001 +0200 @@ -91,7 +91,9 @@ anImage photometric == #palette ifTrue:[ anImage colorMap size < 80 ifTrue:[^ true]. ]. - ^ anImage usedColors size < 80 + anImage usedColors size < 80 ifTrue:[^ true]. + Transcript showCR:'too many colors in image.'. + ^ false "Modified: 27.2.1997 / 12:40:22 / cg" ! @@ -546,6 +548,6 @@ !XPMReader class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libview2/XPMReader.st,v 1.43 2000-09-05 12:44:17 cg Exp $' + ^ '$Header: /cvs/stx/stx/libview2/XPMReader.st,v 1.44 2001-08-22 16:38:32 cg Exp $' ! ! XPMReader initialize!