i have Custom script , it is working as per my requirements and now i want script code for apply same script for different images in same time?
the following code is custom code, could you check it once and add batch process code to following Script
(define (script-fu-sg-kumar-kovuru image layer)
(let* ((width (car (gimp-drawable-width layer)))
(height (car (gimp-drawable-height layer)))
(aspect (/ height width))
)
(gimp-image-undo-group-start image)
(gimp-context-push)
(if (< (/ 300 width) (/ 300 height))
(gimp-layer-scale layer
300
(* 300 aspect)
TRUE)
(gimp-layer-scale layer
(/ 300 aspect)
300
TRUE ))
(gimp-context-set-background '(225 225 225))
(gimp-layer-resize layer
320
320
(/ (- 320 (car (gimp-drawable-width layer))) 2)
(/ (- 320 (car (gimp-drawable-height layer))) 2))
(gimp-layer-flatten layer)
(gimp-image-resize-to-layers image) ; Uncomment if image should be scaled
(gimp-context-pop)
(gimp-image-undo-group-end image)
(gimp-displays-flush)
)
)
(script-fu-register "script-fu-sg-kumar-kovuru"
"Scale layer per Kumar Kovuru"
"Fit layer in 300x300 with white border"
"Saul Goode"
"Saul Goode"
"September 2013"
"RGB*,GRAY*"
SF-IMAGE "Image" 0
SF-DRAWABLE "Drawable" 0
)
(script-fu-menu-register "script-fu-sg-kumar-kovuru"
"<Image>/Filters/Misc/"
)
Please stop posting the same request multiple times. I've already answered you here: http://registry.gimp.org/node/28543
Recent comments