maderios writes:
> The Akkana script
> https://github.com/akkana/gimp-plugins/blob/master/save-export-clean.py
> works well now.

For those who haven't used sites like Github before: be sure to
click on "Raw" before saving the plug-in to your plug-ins directory.

minhsien0330 writes:
> After testing it I found this plug-in will not export the background layer
> to save.

Interesting! Thanks for the clear steps -- I see the same thing you do.

I had wondered why the PDB call gimp-file-save required a drawable
(layer) argument. It looks like, when exporting to formats like jpeg
which can't handle multiple layers, gimp-file-save uses that
argument to decide which layer to save. That also explains why,
in GIMP 2.6 and earlier, we had to go through that extra step of
flattening the image if it had multiple layers before it could be
saved to jpeg.

To get around that, the plug-in would probably have to have some
of extra logic:

if (the image has multiple layers)
    look up target file type to see if the format supports that
    if not supported:
        save context for undo, or make a duplicate image
        flatten the image
        save it
        undo the flatten or delete the duplicate image

I don't know of a way using the GIMP pdb to look up whether a
particular file format needs flattening. So the plug-in might have
to maintain its own table of formats.

I had been thinking about this plug-in as something for people who
edit a png or jpg or whatever, make a simple change and re-save it.
I figured that when someone starts adding extra layers, they'd
actually prefer the "save as xcf, export a copy to jpg" model ...
at least, that's my own workflow. Do you think there are a lot of
people who use multiple layers yet save as jpg?

> Besides, how do I setup the exported  jpg quality? The defualt jpeg output
> quality of Save/Export Clean seems very low.

That's a good question, and might require more research. At first I
assumed it was following my default settings for the jpeg plug-in.
If you export to JPG and get the dialog, you can click on "Save
Settings" after adjusting the Quality slider. But GIMP doesn't
actually seem to save those settings -- I find that whatever I
adjust them to, my jpg quality settings end up at 90, whether I
actually set the default higher or lower than that.

That might be a bug -- if so, we should probably move to the
gimp-developer list to find out (CCing). I'll do more testing
before filing one, but it seems odd that quality keeps ending
up at 90 and I don't seem to be able to change it.

        ...Akkana
_______________________________________________
gimp-user-list mailing list
gimp-user-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-user-list

Reply via email to