Merge lp://qastaging/~kenseehart/phatch/PGM_bugfix_472978 into lp://qastaging/phatch

Proposed by Ken Seehart
Status: Merged
Merged at revision: not available
Proposed branch: lp://qastaging/~kenseehart/phatch/PGM_bugfix_472978
Merge into: lp://qastaging/phatch
Diff against target: 27 lines (+3/-7)
1 file modified
phatch/lib/imtools.py (+3/-7)
To merge this branch: bzr merge lp://qastaging/~kenseehart/phatch/PGM_bugfix_472978
Reviewer Review Type Date Requested Status
Stani Pending
Review via email: mp+19899@code.qastaging.launchpad.net
To post a comment you must log in.
Revision history for this message
Ken Seehart (kenseehart) wrote :

Fixed bug 472978 - PGM save

1554. By Ken Seehart <ken@ken-laptop>

Fixed PBM bug (not reported)

1555. By Ken Seehart <ken@ken-laptop>

merge from trunk

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'phatch/lib/imtools.py'
2--- phatch/lib/imtools.py 2009-10-06 05:47:25 +0000
3+++ phatch/lib/imtools.py 2010-02-23 01:16:13 +0000
4@@ -673,10 +673,8 @@
5 elif format == 'GIF':
6 return convert(image, 'P', palette=Image.ADAPTIVE)
7 elif format == 'PBM':
8- if image.mode in ['P', 'CMYK', 'YCbCr']:
9- return image.convert('RGB')
10- if image.mode in ['LA']:
11- return image.convert('L')
12+ if image.mode != '1':
13+ return image.convert('1')
14 elif format == 'PCX':
15 if image.mode in ['RGBA', 'CMYK', 'YCbCr']:
16 return image.convert('RGB')
17@@ -688,9 +686,7 @@
18 if image.mode in ['RGBA', 'YCbCr']:
19 return image.convert('RGB')
20 elif format == 'PGM':
21- if image.mode in ['P', 'CMYK', 'YCbCr']:
22- return image.convert('RGB')
23- if image.mode in ['LA']:
24+ if image.mode !='L':
25 return image.convert('L')
26 elif format == 'PPM':
27 if image.mode in ['P', 'CMYK', 'YCbCr']:

Subscribers

People subscribed via source and target branches

to status/vote changes: