Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Inconsistent outcomes with batch processing
#4
(04-26-2019, 11:27 AM)TimHaydnJones Wrote: Hi all - first time poster here
I am interesting in using the batch processing mode and have copied some script code from
https://bsenduran.blogspot.com/2017/09/r...mp-in.html
and it is working within the script-fu console.
So far, so good
When I try to run the same script from a command line, using syntax like this

"C:\Program Files\GIMP 2\bin\gimp-2.10.exe" -b '(timbo "C:\\Folder1\\Folder2\\*.JPG" 0.5)'
(I've tried single and double backslashes in the path passed)

They should really require a blogging license...

With ImageMagick, no need to write a single line of code:

Code:
mogrify -quality 50 C:\Folder1\Folder2\*.JPG

Many things you want to do in batch can be done (and are more efficiently done) with ImageMagick, which is designed to be called from the command line. For instance, when I want an easy to distribute lo-res version of the photos from my camera:

Code:
convert "$f" -modulate 100,120 -geometry 3000 -sharpen 0x1.0 -quality 85 "$dir/$(basename "$f" .JPG).jpg"

(this is Linux shell, but Windows shell is similar). In this one-liner:
  • modulate increases the color saturation (my camera is set on rather bland colors, easier to edit)
  • geometry scales down the image  (3000px along longest edge)
  • sharpen sharpens slightly to mitigate some of the blur that comes with downscaling
  • quality sets the JPEG quality when saving the result.
If you really want to do your own Gimp scripts in batch, it can be easier to do it in Python: see here for an example.
Reply


Messages In This Thread
RE: Inconsistent outcomes with batch processing - by Ofnuts - 04-26-2019, 01:30 PM

Forum Jump: