Newbie: Having Trouble with "gimp-image-add-layer"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello everyone,

I'm trying to open an existing image as a layer

I opened an image manually before running this script:

(define (script-fu-sonaya-bckgnd)
(let*	(
  (ImageId (aref (cadr (gimp-image-list)) 0))  ;get the image id
  (Sonaya (car (gimp-file-load-layer 1 ImageId "D:\\mi\\brd02.png")))
         )
  (gimp-image-add-layer ImageId Sonaya -1)
)

The "gimd-image-add-layer" procedure fails.

It did work when I did the above manually in the GIMP console:

> (aref (cadr (gimp-image-list)) 0)
26
> (car (gimp-file-load-layer 1 26 "D:\\mi\\brd02.png"))
74
> (gimp-image-add-layer 26 74 -1)
(#t)


I don't know what's wrong with the variables that I defined.

Also, how can I see values of variables in the console window during 
script execution ?  Someone said I can "define" them, how do I do 
this ?

Thanks for your time and help,

Peter



[Index of Archives]     [Gimp Developers]     [Gimp Users]     [Yosemite News]     [Epson Inkjet Printers]     [Scanners]     [Gimp's Home]     [Steve's Art]

&hbsp; Powered by Linux