--- a/XBMReader.st Mon Aug 17 10:06:57 1998 +0200
+++ b/XBMReader.st Mon Aug 17 10:17:18 1998 +0200
@@ -69,11 +69,20 @@
canRepresent:anImage
"return true, if anImage can be represented in my file format"
- |photometric|
+ |photometric clr0 clr1|
(anImage depth ~~ 1) ifTrue:[^ false.].
- (((photometric := anImage photometric) ~~ #blackIs0) and:[photometric ~~ #whiteIs0]) ifTrue:[^ false.].
- ^ true
+ (photometric := anImage photometric) == #blackIs0 ifTrue:[^ true].
+ photometric == #whiteIs0 ifTrue:[^ true].
+ photometric == #palette ifTrue:[
+ clr0 := anImage colorFromValue:0.
+ clr1 := anImage colorFromValue:1.
+ (clr0 = Color white and:[clr1 = Color black]) ifTrue:[^true].
+ (clr1 = Color white and:[clr0 = Color black]) ifTrue:[^true].
+ ].
+ ^ false
+
+ "Modified: / 17.8.1998 / 10:17:01 / cg"
!
isValidImageFile:aFileName
@@ -309,6 +318,6 @@
!XBMReader class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/XBMReader.st,v 1.38 1998-02-03 17:19:55 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/XBMReader.st,v 1.39 1998-08-17 08:17:18 cg Exp $'
! !
XBMReader initialize!