diff -r 6ee198fcb0e0 -r 3c54279a418c XBMReader.st --- a/XBMReader.st Thu Oct 11 18:32:49 2001 +0200 +++ b/XBMReader.st Tue Oct 16 13:25:48 2001 +0200 @@ -73,17 +73,18 @@ |photometric clr0 clr1| - (anImage depth ~~ 1) ifTrue:[^ false.]. - - photometric := anImage photometric. - ((photometric == #blackIs0) or:[photometric == #whiteIs0]) ifTrue:[^ true]. + (anImage depth == 1) ifTrue:[ + photometric := anImage photometric. + ((photometric == #blackIs0) or:[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]. + 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]. + ]. ]. + Transcript showCR:'XBMReader: not a b&w image.'. ^ false "Modified: / 17.8.1998 / 10:17:01 / cg" @@ -363,6 +364,6 @@ !XBMReader class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libview2/XBMReader.st,v 1.44 2001-09-21 08:02:25 cg Exp $' + ^ '$Header: /cvs/stx/stx/libview2/XBMReader.st,v 1.45 2001-10-16 11:25:48 cg Exp $' ! ! XBMReader initialize!