On Wed, 10 Jan 2007 15:38:21 +1000, Anthony Thyssen wrote: > "Amadeus W. M." on wrote... > | I'm trying to crop a a pgm image like this: > | > | convert -crop 50x50 lena.pgm tmp.pgm > | > | The resulting pgm has white value = 65535 rather than 255: > | > | head -3 tmp.pgm > | P5 > | 50 50 > | 65535 > | > | even though the original is ok: > | > | head -3 lena.pgm > | P5 > | 208 222 > | 255 > | > | Also, the resulting tmp.pgm image has size 92722 bytes rather than > | 50x50=2500 as I'd expect (without the header). Despite all this, xv > | displays it correctly. I don't understand. What's going on? > | > | Thanks! > | > You are using a Q16 version of IM which premotes all color values to 16 > bit quality (-depth 16). > > The thrid line just says what the maximum value is for the data > that follows. > > If you want it 255 you can set -depth 8 before saving the PGM file. >
I saw the -depth option after I posted. Thanks for the answer. Forgive my ignorance, what is a Q16 version of IM? For what it's worth, I'm on a Fedora Core 6 system on and rpm -q ImageMagick ImageMagick-6.2.8.0-3.fc6.1 Do I have a choice? I want depth 8 by default. The thing of it is I've been using convert for a long time, on a fairly regular basis, and I never noticed the depth problem/feature. There was a recent IM update, maybe they changed to Q16. _______________________________________________ Magick-users mailing list [email protected] http://studio.imagemagick.org/mailman/listinfo/magick-users
