Thanks for trying. This is distressing since I'm using code that was known to work with Linux systems. I did find one thing that might have created the problem and fixed it with the code below. Please try that and let me know your results. If I can't resolve the save issue, I'll ask someone on another forum for assistance. If that doesn't work, I'll have to give up because if the save option doesn't work, there's need to pursue it any further.
(define (fp-script-fu-watermark load pattern position color opacity azimuth elevation depth waterlevel ambient compensate invert type location filename )
(let* (
(filelist (cadr (file-glob (string-append load "\\*" ".jpg") 1)))
(s 1)
(count (car (file-glob (string-append load "\\*" ".jpg") 1)))
(drawable 0)
(patWidth (car (gimp-pattern-get-info pattern)))
(patHeight (cadr (gimp-pattern-get-info pattern)))
(patLayer 0)
(active 0)
(bumpLayer 0)
(filename2 0)
(offsetX 0)
(offsetY 0)
(imageWidth 0)
(imageHeight 0)
)
(while (pair? filelist)
(let* (
(loadfile (car filelist))
(image (car (gimp-file-load RUN-NONINTERACTIVE loadfile loadfile)))
)
;(gimp-display-new image)
(set! imageWidth (car (gimp-image-width image)))
(set! imageHeight (car (gimp-image-height image)))
(cond
( (= position 1) ; top right
(set! offsetX (- imageWidth patWidth))
)
( (= position 2) ; center
(set! offsetX (- (/ imageWidth 2) (/ patWidth 2)))
(set! offsetY (- (/ imageHeight 2) (/ patHeight 2)))
)
( (= position 3) ; bottom left
(set! offsetY (- imageHeight patHeight))
)
( (= position 4) ; bottom right
(set! offsetX (- imageWidth patWidth))
(set! offsetY (- imageHeight patHeight))
)
)
(set! patLayer (car (gimp-layer-new image patWidth patHeight RGBA-IMAGE "Pattern Layer" opacity NORMAL-MODE)))
(set! bumpLayer (car (gimp-image-get-active-layer image)))
(gimp-drawable-fill patLayer TRANSPARENT-FILL)
(gimp-drawable-fill patLayer PATTERN-FILL)
(gimp-image-add-layer image patLayer -1)
(gimp-layer-set-offsets patLayer offsetX offsetY)
(gimp-layer-set-lock-alpha patLayer TRUE)
(gimp-context-set-foreground color)
(gimp-edit-fill patLayer FOREGROUND-FILL)
(gimp-displays-flush)
(gimp-layer-resize-to-image-size patLayer)
(plug-in-bump-map RUN-NONINTERACTIVE image bumpLayer patLayer azimuth elevation depth 0 0 waterlevel ambient compensate invert type)
(set! active (car (gimp-image-flatten image)))
(gimp-displays-flush)
(set! filename2 (string-append location "/" filename (string-append (number->string s))".jpg"))
(gimp-file-save RUN-NONINTERACTIVE image active filename2 filename2)
(set! s (+ s 1))
(gimp-image-delete image)
(set! count (- count 1))
(set! filelist (cdr filelist))
))
)
)
(script-fu-register "fp-script-fu-watermark"
"<Image>/File/Watermark..."
"Adds a bump mapped watermark to a folder of jpg images."
"Art Wade"
"Art Wade"
"March 2010"
""
SF-DIRNAME "Load pictures from" ""
SF-PATTERN "Pattern to use as bump map watermark" "Watermark"
SF-OPTION "Watermark position" '("Upper Left" "Upper Right" "Center" "Lower Left" "Lower Right")
SF-COLOR "Watermark color" '(255 255 255)
SF-ADJUSTMENT "Watermark opacity" '(100.0 0.0 100.0 1 10 1 0)
SF-ADJUSTMENT "Bump map azimuth" '(50.0 0.0 360.0 1 10 1 0)
SF-ADJUSTMENT "Bump map elevation" '(45.0 0.5 90.0 1 10 1 0)
SF-ADJUSTMENT "Bump map depth" '(2 1 65 1 10 0 0)
SF-ADJUSTMENT "Bump map waterlevel" '(0 0 255 1 10 0 0)
SF-ADJUSTMENT "Bump map ambient" '(0 0 255 1 10 0 0)
SF-TOGGLE "Bump map compensate for darkening" TRUE
SF-TOGGLE "Bump map invert" FALSE
SF-OPTION "Bump map type" '("LINEAR" "SPHERICAL" "SINUSOIDAL")
SF-DIRNAME "Save pictures to" "Save To"
SF-STRING "Name for watermarked images" "filename"
)