I realized that this wasn't particularly descriptive.  My failing
script looks like this:

(define (script-reflect filename)
(let* ((image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
(drawable (car (gimp-image-get-active-layer image))))
(script-fu-gimp-reflection RUN-NONINTERACTIVE image drawable 30 100 FALSE TRUE)
(gimp-file-save RUN-NONINTERACTIVE image drawable filename filename)
(gimp-image-delete image)))

Thank you for any help,

Mark

On Mon, Jul 5, 2010 at 11:40 PM, Mark McLaren <mark.mcla...@gmail.com> wrote:
> Hi all,
>
> I am a Script-Fu and Scheme newbie; please forgive my ignorance.  I am
> trying add reflection to a batch of PNG files using the GIMP reflection
> plugin from:
>
> http://registry.gimp.org/node/1025
>
> I have previously been able to batch re-size my PNG files using a
> script-autocrop script that I found on the GimpTalk forum.
>
> http://www.gimptalk.com/forum/script-autocrop-p265988.html
>
> To create a batch reflection script I have tried taking a copy of
> script-autocrop, changed the definition name to match the new filename and
> changed the "plug-in-autocrop" line so that it call the reflection plugin
> instead, like this:
>
> (script-fu-gimp-reflection RUN-NONINTERACTIVE image drawable 30 100 FALSE
> TRUE)
>
> If I run it, I get the following error:
>
> GIMP-Error: Calling error for procedure 'gimp-file-save':
> Procedure 'gimp-file-save' has been called with an invalid ID for argument
> 'draw
> able'. Most likely a plug-in is trying to work on a layer that doesn't exist
> any
>  longer.
>
> batch command experienced an execution error
>
> What am I doing wrong?  Any assistance is appreciated.
>
> Many thanks,
>
> Mark
>
> OS: winxp
> GIMP: 2.6.8
>

-- 
"Paradoxically, the more time saving abstractions you are using the
more you actually have to know." - Simon Willison
_______________________________________________
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user

Reply via email to