It is currently Wed Sep 30, 2026 3:58 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Gimp Script to blend batch images
PostPosted: Fri Oct 17, 2014 6:07 am  (#1) 
Offline
New Member

Joined: Oct 17, 2014
Posts: 1
GIMP Version: 2.8.10
Operating System: Windows
OS Version: Win7
GIMP Experience: Basic Level



Hi, I made this script to blend batch images with a color, using DODGE-MODE, but nothing happens. Someone can help me?

[font=monospace](define (batch-blend pattern red blue green)
(let* ((filelist (cadr (file-glob pattern 1))))
(while (not (null? filelist))
(let* ((filename (car filelist))
(image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
(height (car (gimp-image-height image)))
(width (car (gimp-image-width image)))
(my-layer (car (gimp-layer-new image width height RGB-IMAGE "my layer" 0 DODGE-MODE)))
(output-layer))
(gimp-context-set-background '(red blue green))
(gimp-drawable-fill my-layer BACKGROUND-FILL)
(gimp-layer-set-mode my-layer DODGE-MODE)
(gimp-image-add-layer image my-layer -1)
(set! output-layer (car (gimp-layer-new-from-visible image image "visible")))
(gimp-file-save RUN-NONINTERACTIVE image output-layer filename filename)
(gimp-image-delete image))
(set! filelist (cdr filelist)))))[/font]


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Gimp Script to blend batch images
PostPosted: Fri Oct 17, 2014 6:30 am  (#2) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
The procedure browser entry for gimp-layer-new-from-visible says that you have to add the new layer using gimp-image-add-layer

And please use the [ code ] [ / code ] tags when posting code.

Kevin


Top
 Post subject: Re: Gimp Script to blend batch images
PostPosted: Fri Oct 17, 2014 7:04 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: Apr 07, 2010
Posts: 14182
Done

_________________
Image


Top
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group