Apparently PIL saves PGM internally as PPM unless you convert the image
to grayscale first. Add proper check for format to fix the issue
(perhaps to imtools save?).
Here's a test case I used to verify this behavior:
from Image import open
im = open('Lenna.png')
gim = im.convert('L')
gim.save('Lenna1.pgm')
im.save('Lenna2.pgm')
im.save('Lenna3.ppm')
--
Save to pgm actually saves to pnm
https://bugs.launchpad.net/bugs/472978
You received this bug notification because you are a member of Phatch
Developers, which is subscribed to Phatch.
Status in Phatch = Photo & Batch!: Incomplete
Status in “phatch” package in Ubuntu: Incomplete
Bug description:
Binary package hint: phatch
When i save to PGM format, it actually saves to PNM. Being PGM a grayscale
format it would be very usefull we could save directly to PGM instead of PNM.
_______________________________________________
Mailing list: https://launchpad.net/~phatch-dev
Post to : [email protected]
Unsubscribe : https://launchpad.net/~phatch-dev
More help : https://help.launchpad.net/ListHelp