You are here

Can any one help me that How to create Batch process for Custom Script?

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)
(if (< (/ 300 width) (/ 300 height))
(gimp-layer-scale layer
(* 300 aspect)
(gimp-layer-scale layer
(/ 300 aspect)
(gimp-context-set-background '(225 225 225))
(gimp-layer-resize layer
(/ (- 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-image-undo-group-end image)
(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"
SF-IMAGE "Image" 0
SF-DRAWABLE "Drawable" 0

(script-fu-menu-register "script-fu-sg-kumar-kovuru"

I'm not sure what you mean

Do you mean you want to run the script on multiple images that you have already opened in GIMP? or that you want to run it on multiple images files? (which is what I thought you were asking)

Can we please take this conversation onto one of the proper GIMP forums ( or ) because they work much better than this place.

Batch Script code for custom script?

it is totally different i need script code for custom script, i want apply custom script for different images at same time.

Have a look here

Have a look at to see how someone else has implemented batch processing

Subscribe to Comments for "Can any one help me that How to create Batch process for Custom Script?"