patchSkencil - Patches: patch #2843, Formats in


You are not allowed to post comments on this tracker with your current authentication level.

patch #2843: Formats in

Submitter:  Frank Koormann <coreman>
Submitted:  Mon 22 Mar 2004 09:21:14 AM UTC
Category:  for 0.6 series Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open

Sat 24 Apr 2004 07:57:46 PM UTC, comment #1: 

There are several bugs in the patch

1. Omitting the filetype doesn't work:

Traceback (most recent call last):
  File "./", line 127, in ?
    result = main()
  File "./", line 123, in main
    export_raster(context, ppmfile, resolution, use_bbox, format = format,
UnboundLocalError: local variable 'format' referenced before assignment

2. The filelist in Script.export_raster is only meant for the tk file dialog.  The patch uses the file name extension from that list as the format parameter to export_raster.  That parameter is not the extension.  It's the name PIL uses for the format which can be different.  In the case of JPG for instance the extension is "jpg" whereas the PIL format name is "JPEG" (PIL matches the format name case insensitivley, though).  This means -f jpg gives an error:

Traceback (most recent call last):
  File "./", line 127, in ?
    result = main()
  File "./", line 124, in main
    antialias = alpha)
  File "./Script/", line 163, in export_raster, format = format)
  File "/usr/local/lib/python2.2/site-packages/PIL/", line 729, in save
    SAVE[string.upper(format)](self, fp, filename)
KeyError: JPG

Bernhard Herzog <bh>
Group administrator
Mon 22 Mar 2004 09:21:14 AM UTC, original submission:  

The patch enables sk2ppm to use all raster formats supported by Script.export_raster:
- Command line option to list formates and
- command line option to specify format to be used.

Frank Koormann <coreman>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #7172:  sk2ppm.py_formats.patch added by coreman (3KiB - application/octet-stream - Patch )


Depends on the following items: None found

Items that depend on this one: None found


CC list is empty


There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2004-03-22 coreman Attached File- Added sk2ppm.py_formats.patch, #2971
    Carbon-Copy- Added coreman

Back to the top

Powered by Savane 3.13-b921.
Corresponding source code