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)
(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/"
)

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 ( gimpchat.com or gimpforums.com ) 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 http://registry.gimp.org/node/28517 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?"