Accessing the save options for different file formats...
Posted 20 December 2011 - 07:20 AM
When saving in GIMP, you get a number of options for each format (LZW compression, include Alpha, JPG compression etc). Is it possible to access those interfaces from my Python plug-in, and just get the return values. So that when I export a whole book, each page can be saved using those options with the appropriate file-save-* procedure?
Preferably I would like the plug-in to support all the formats that the GIMP supports saving to, without actually implementing my own version of the GUI for each format.
Posted 22 December 2011 - 11:28 AM
I've implemented export to png, tif, gif, jpg, psd and xcf, to my plug-in, and think I'll leave it at that for now.
Am I correct in thinking that you want to get the default settings for the options for each image-type so that you can pass them to the various file-*-save functions? If so, why don't you use gimp-image-save which automagically selects the correct file-*-save function based on file extension and uses the default (or possibly last used?) settings for each image type.
And you'll probably get quicker answers to script problems over on GimpChat.
This post has been edited by paynekj: 22 December 2011 - 11:31 AM
Posted 22 December 2011 - 02:28 PM
Now I just need to change how it handles scaling and cropping, and add a progress bar when loading and exporting...at which point it's more or less complete. The plan is to use it a bit for my next comic as a beta test, so I can tweak things a bit while actually using it. And then publish it.