Continuing. The code that is eventually used to do the save is: =================== def SaveGIF(self): if self.current_path: default_path = splitext(basename(self.current_path))[0] + ".gif" path = asksaveasfilename(defaultextension=".gif", title="Save as GIF", initialfile=default_path, filetypes=GIF_FILE_TYPES) else: path = asksaveasfilename(defaultextension=".gif", title="Save as GIF", filetypes=GIF_FILE_TYPES): if not path: return gif = self.current_image.convert("RGB") gif.save(path) ================== I would think convert makes the conversion. If so, then it must know a lot of formats. How do I know which ones it has available? If it has a small set, is there some way to find another "convert" that produces, say, a 'pcx" formated file. Apparently, "RGB" and "GIF" mean the same thing. Seems a bit odd. John Fouhy wrote: 2009/1/23 Wayne Watson <sierra_mtnv...@sbcglobal.net>:What I'm getting at it is when I see something in a program as: path = asksaveasfilename(defaultextension=".jpg", title="Save as JPEG", initialfile=default_path, filetypes=IMAGE_FILE_TYPES)I'm guessing when the program executes this, it's really saves a file in the jpg format.[...] All asksaveasfilename does is give you a filename/path. You then have to open the file and write the data to it. It's up to you to make sure the data is in the right format.. --
Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time) "The creation of the world did not occur at the beginning of time; it occurs every day." -- M. Proust Web Page: <www.speckledwithstars.net/> |
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor