![]() |
scriptfu could says what values to be expected - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP) +---- Forum: Scripting questions (https://www.gimp-forum.net/Forum-Scripting-questions) +---- Thread: scriptfu could says what values to be expected (/Thread-scriptfu-could-says-what-values-to-be-expected) |
scriptfu could says what values to be expected - estatistics - 02-24-2025 scriptfu could says what values to be expected instead of saying only "Error: Invalid value for argument 1" Moreover it can provide an example how to set the arguments in a variable. eg. (file-webp-export 1 0 0 0 a.jpg b.jpg) can save a as b with these numberd arguments means ... How to export all my jpg images as webp using gimp in linux bash in batch? gimp -i -b '(let* ((image (car (gimp-file-load RUN-NONINTERACTIVE "DSC_0978.JPG"))))(file-webp-export RUN-NONINTERACTIVE image "DSC_0978.webp" lossless include-exif include-xmp))' --batch-interpreter="plug-in-script-fu-eval" I cant understand what arguments must put in which positions. Script fu menu for file-webp-export has a lot! Whcih of these are essential and in what positions? When using Code: gimp -i -b '(let* ((image (car (gimp-file-load RUN-NONINTERACTIVE "DSC_0978.JPG"))))(file-webp-export RUN-NONINTERACTIVE image "DSC_0978.webp"))' --batch-interpreter="plug-in-script-fu-eval" it says Code: (script-fu:457680): scriptfu-WARNING **: 14:16:06.586: Missing arg type: GimpExportOptions but when using Code: gimp -i -b '(let* ((image (car (gimp-file-load RUN-NONINTERACTIVE "DSC_0978.JPG"))))(file-webp-export run-mode "1" image "DSC_0978.webp" 100))' --batch-interpreter="plug-in-script-fu-eval" it says Code: batch command experienced an execution error: RE: scriptfu could says what values to be expected - Ofnuts - 02-25-2025 An API is not means for human beings, it is meant for programmers. In the script-fu console, hit the Browse... button, the search webp, click on the API on the left, and the doc appears on the right... However from the message "Calling Plug-In PDB procedures with arguments as an ordered list is deprecated." it seems you are using Gimp3, so you may want to read this. In which case AFAIK you can skip all non-essential arguments and it will use defaults. Last, I don't know why you want to use Gimp for this if you are on Linux. Just install ImageMagick (available in all distros), and then in a shell script it can be as simple as: Code: convert foo.jpg foo.webp or on recent versions Code: magick foo.jpg foo.webp Most operations you want to do in batch can be done with ImageMagick. For instance I have this line in a script to generate a low-resolution image of my photos. It adds some contrast (-modulate), scales (-geometry), and sharpens a bit. Code: convert "$f" -modulate 100,120 -geometry ${size}x${size} -sharpen 0x1.0 -quality $quality "$out" RE: scriptfu could says what values to be expected - rich2005 - 02-25-2025 @estatistics Just a suggestion, a front end for IM converseen https://converseen.fasterland.net/ |