Closed 0ion9 closed 9 years ago
Thanks for pointing this out. I'll take a look at this tomorrow since it's getting quite late here.
This has now been fixed. I'll eventually be adding some more save parameters to allow more customization, such as enabling lossless mode and adjusting the quality of the alpha channel.
Thanks, that was a very prompt response.
Hi, I was just trying to add webp support to my 'export selection' plugin, and found this bug.
In brief, when you attempt to call the PDB procedure file-webp-save from another plugin, it pops up the export settings dialog regardless of the fact it is being called non-interactively (run-mode = GIMP_RUN_NONINTERACTIVE). This is incorrect and interrupts whatever UI the calling plugin was presenting.
To quote the plugin writing guide:
A simple test case is:
(Note that the first and second call to pdb.file_webp_save are equivalent, as run_mode=RUN_NONINTERACTIVE is the default when calling from Python-Fu. Also note that all of the calls to file_webp_save pop up the settings dialog, whereas only the final call (with RUN_INTERACTIVE) should actually do this. ) You can compare this with, for example, the behaviour of
pdb.file_png_save(i, i.layers[0], '/tmp/output.png','/tmp/output.png', 1,9,1,1,1,1,1)
andpdb.file_png_save(i, i.layers[0], '/tmp/output.png','/tmp/output.png', 1,9,1,1,1,1,1, run_mode=RUN_INTERACTIVE)