[Gimp-developer] PyGIMP question: saving PNG and XCF versions of the same image
David Gowers
00ai99 at gmail.com
Thu May 28 22:46:25 PDT 2009
Hello Ryan,
On Fri, May 29, 2009 at 1:48 PM, Ryan Krauss <ryanlists at gmail.com> wrote:
> I have a Python Gimp question. I don't know if it belongs on the user or
> developer list, but my feeling is that the people with the knowledge are
> more likely to read this list. Let me know if this is the wrong list to
> post to.
>
> I have written a script to create PNG and XCF versions of an image I want to
> save. I have a certain layer whose visibility I want to turn off before I
> save the PNG but I also want the XCF to give me more editting power if I
> want to alter the image later. I have this working fairly well, but the
> problem is that when my script finishes, I am looking at the flattened PNG
> version of the image. At that point, I would need to close the PNG and
> re-open the XCF if I want to edit the file. This is less than ideal. I
> think it could be solved by simply doing one undo step after saving the PNG
> (since flattening was the last thing I did), but I don't see in the
> procedural database a way to undo from a script. Is there a way to save a
> flattened PNG and then save an unflattened XCF of the same image and leave
> the XCF open?
Duplicate the image and do your flattening on the copy. It's more
efficient than you might think -- the main time involved in
duplicating a moderate sized image seems to be actually in setting up
its GUI window rather
More information about the Gimp-developer
mailing list