Noid
Platinum Member
Please forgive my request for help, if topic is already posted.
I found a script on the net here that is supposed to crop multiple images in batch mode using GIMP. I would like get it working. There are a couple of things I already fixed in the batch file, but I can't get the script to execute.
( 1.)
This is my "batch-crop.bat" file and it's located in the same directory with my images to be cropped. My system path has been modified to find GIMP no matter where a script is run.
gimp-2.6 -i -b "(batch-crop "*.jpg" )" -b "(gimp-quit 0)"
Notice I added the "-b" to the gimp-quit command to get the original script to close the "GIMP output" console properly.
(2.)
The script is located in my default GIMP script directory :
CDocuments and Settings\Administrator\.gimp-2.6\scripts --- called batch-crop.scm
(define (batch-crop pattern)
(let* ((filelist (cadr (file-glob pattern 1))))
(while (not (null? filelist))
(let* ((filename (car filelist))
(image (car (gimp-file-load 1 filename filename)))
(drawable (car (gimp-image-get-active-layer image))))
(gimp-image-crop image 20 40 0 0)
(gimp-file-save 1 image drawable filename filename)
(gimp-image-delete image))
(set! filelist (cdr filelist)))))
I changed the use of "RUN-NONINTERACTIVE" to "1" according to the parameter descriptions on the functions within GIMP in an attempt to get the script to execute.
I receive this message within the GIMP output window during execution:
"batch command experienced an execution error"
I sent an Email to the author at the website, but I received no reply.
I think I followed the proper placement of files and code corrections, but I have run out of places to find help on the net. GIMP recently updated it's help for 2.6 recently, but it has no help in debugging my problem.
I think the list creation (file-glob) is not working properly. I was hoping to get a "image" name to output for debugging. But had no luck either.
Any GIMP guru out there ?
TIA
I found a script on the net here that is supposed to crop multiple images in batch mode using GIMP. I would like get it working. There are a couple of things I already fixed in the batch file, but I can't get the script to execute.
( 1.)
This is my "batch-crop.bat" file and it's located in the same directory with my images to be cropped. My system path has been modified to find GIMP no matter where a script is run.
gimp-2.6 -i -b "(batch-crop "*.jpg" )" -b "(gimp-quit 0)"
Notice I added the "-b" to the gimp-quit command to get the original script to close the "GIMP output" console properly.
(2.)
The script is located in my default GIMP script directory :
CDocuments and Settings\Administrator\.gimp-2.6\scripts --- called batch-crop.scm
(define (batch-crop pattern)
(let* ((filelist (cadr (file-glob pattern 1))))
(while (not (null? filelist))
(let* ((filename (car filelist))
(image (car (gimp-file-load 1 filename filename)))
(drawable (car (gimp-image-get-active-layer image))))
(gimp-image-crop image 20 40 0 0)
(gimp-file-save 1 image drawable filename filename)
(gimp-image-delete image))
(set! filelist (cdr filelist)))))
I changed the use of "RUN-NONINTERACTIVE" to "1" according to the parameter descriptions on the functions within GIMP in an attempt to get the script to execute.
I receive this message within the GIMP output window during execution:
"batch command experienced an execution error"
I sent an Email to the author at the website, but I received no reply.
I think I followed the proper placement of files and code corrections, but I have run out of places to find help on the net. GIMP recently updated it's help for 2.6 recently, but it has no help in debugging my problem.
I think the list creation (file-glob) is not working properly. I was hoping to get a "image" name to output for debugging. But had no luck either.
Any GIMP guru out there ?
TIA
Last edited: