Save to pgm actually saves to pnm

Bug #472978 reported by djodjo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Phatch
Fix Released
Medium
Ken Seehart
phatch (Ubuntu)
Fix Released
Undecided
Ken Seehart

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.

Revision history for this message
Stani (stani) wrote :

Please add action list with example input and (actual and desired) output images. You can zip it if you like.

Changed in phatch (Ubuntu):
assignee: nobody → stani (stani)
status: New → Incomplete
Changed in phatch:
assignee: nobody → stani (stani)
status: New → Incomplete
Stani (stani)
Changed in phatch:
milestone: none → 0.2.6
assignee: stani (stani) → Juho Vepsäläinen (bebraw)
Changed in phatch (Ubuntu):
assignee: stani (stani) → Juho Vepsäläinen (bebraw)
Stani (stani)
summary: - save to pgm actually saves to pnm
+ Save to pgm actually saves to pnm
Revision history for this message
Juho Vepsäläinen (bebraw) wrote :

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')

Stani (stani)
Changed in phatch:
milestone: 0.2.6 → 0.2.7
Stani (stani)
Changed in phatch:
assignee: Juho Vepsäläinen (bebraw) → Ken Seehart (kenseehart)
Changed in phatch (Ubuntu):
assignee: Juho Vepsäläinen (bebraw) → Ken Seehart (kenseehart)
Revision history for this message
Stani (stani) wrote :

This is fixed in trunk and will be part of next release 0.2.7 Big thanks to Juho and Ken!

Changed in phatch:
importance: Undecided → Medium
status: Incomplete → Fix Committed
Stani (stani)
Changed in phatch (Ubuntu):
status: Incomplete → In Progress
Stani (stani)
Changed in phatch:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package phatch - 0.2.7-1

---------------
phatch (0.2.7-1) unstable; urgency=low

  [ Stani M ]
  * Upstream bugfix release (Closes LP: #472978, #487435, #516763, #516858,
    #525999, #526047, #526235, #526237, #526489, #529343, #529429, #525831,
    #526237, #529544, #529605, #531375, #531705, #531728, #532346, #532356,
    #532540, #532544, #533068, #534723, #534834, #534835, #535189, #535192,
    #536820)
  * debian/control: Add python-nautilus to phatch-nautilus's Depends

  [ Emilio Pozuelo Monfort ]
  * debian/rules:
    - Adapt for the upstream changes.
  * debian/copyright:
    - Updated for the new version.
 -- Stani <email address hidden> Mon, 22 Mar 2010 18:33:31 +0000

Changed in phatch (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.