Inconsistent outcomes with batch processing - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions) +--- Thread: Inconsistent outcomes with batch processing (/Thread-Inconsistent-outcomes-with-batch-processing) |
Inconsistent outcomes with batch processing - TimHaydnJones - 04-26-2019 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/reducing-image-quality-with-gimp-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) I have had three basic types of outcome - I had a few occasions when a second console window opened up and, in this, I got a message to say that the batch file had completed successfully Then, I must have done something, but I don't know what - because I then went through a phase when I didn't get the 2nd console window up - I get a 'wait' cursor for a few seconds and nothing seemed to have happened - the files weren't processed Now, I've noticed that if I pass an invalid path to GIMP in the command line parameters, I get a different outcome again, which is a 2nd console window which contains the message "Batch commands cannot be run in existing instance in Win32" I am running 64 bit Windows 10 Home Can anyone explain what is going on here? Thanks in advance Tim RE: Inconsistent outcomes with batch processing - Kevin - 04-26-2019 You cannot use single-quotes on a Windows command line. Try this: Code: "C:\Program Files\GIMP 2\bin\gimp-2.10.exe" -b "(timbo \"C:\\Folder1\\Folder2\\*.JPG\" 0.5)" RE: Inconsistent outcomes with batch processing - Ofnuts - 04-26-2019 (04-26-2019, 12:48 PM)Kevin Wrote: You cannot use single-quotes on a Windows command line. Normally you don't need backslashes in file names (the only place where these need to be backslashes is "naked" file names in a command prompt) so Code: "C:/Program Files/GIMP 2/bin/gimp-2.10.exe" -b "(timbo \"C:/Folder1/Folder2/*.JPG\" 0.5)" would work just as well. RE: Inconsistent outcomes with batch processing - Ofnuts - 04-26-2019 (04-26-2019, 11:27 AM)TimHaydnJones Wrote: Hi all - first time poster here 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:
|