Save to pgm actually saves to pnm

Bug #472978 reported by djodjo on 2009-11-03
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Phatch
Medium
Ken Seehart
phatch (Ubuntu)
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.

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) on 2009-12-12
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) on 2009-12-12
summary: - save to pgm actually saves to pnm
+ Save to pgm actually saves to pnm
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) on 2010-02-21
Changed in phatch:
milestone: 0.2.6 → 0.2.7
Stani (stani) on 2010-02-22
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)
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) on 2010-02-25
Changed in phatch (Ubuntu):
status: Incomplete → In Progress
Stani (stani) on 2010-03-17
Changed in phatch:
status: Fix Committed → Fix Released
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  Edit
Everyone can see this information.

Other bug subscribers