I'm not sure if this is the right place to be posting this question (sorry for being a total newb), but I was wondering if anyone could help with a very simple script for GIMP. After editing an image, I would like to be able to run a script that will do the following (in order):
1. Save a copy to a folder
2. Resize the image
3. Save a copy of the resized image to a different folder
4. Close the image
Seems simple enough, but without any background in scripting, I've been having a hard time. I've got the resizing part down. Here's what I've come up with:
(define (photoblog-resize-horizontal image drawable)
(let* ((cur-width (car (gimp-image-width image)))
(cur-height (car (gimp-image-height image)))
(height (/ (* cur-height 800) cur-width))
(gimp-image-scale image 800 height)
_"Resizes horizontal images for photoblog."
"December 4, 2010"
SF-IMAGE "image" 0
SF-DRAWABLE "drawable" 0
What I can't seem to figure out, however, is how to save copies of the open image. I've tried using "gimp-file-save" like this:
(gimp-file-save RUN-NONINTERACTIVE image drawable filename raw-filename)
...but I don't know what to use for the filename arguments. (I saw "file-jpeg-save" too, but that looks exceedingly complicated.)
Would anyone care to help? Or at least direct me to a better place to ask my question? Thanks!