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

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


Hello Kevin and thanks for your help,

I did have one open image.  Before running the script, I opened an 
existing .png image (by clicking menus with the mouse).

Can you point me to the documentation that shows me how to run a 
script from the console and step thru it ? I looked all over the 
online manual, but it just talked about the error console.

Cheers!

Peter
_________________________________

>
> ppapostol wrote:
> > I'm trying to open an existing image as a layer
> > 
> > (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)
> > )
> 
> In order for the above to work you must have at least one open 
image before 
> running the script.
> 
> > 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 ?
> 
> The "define" function is used to define something (ie. make a new 
variable). 
> It is not used to show you the value, or contents, of something. 
If you want 
> to see the values of a variable, use "display".
> 
> It used to be possible to have output from Script-Fu be seen on 
the console 
> from which GIMP was run but I think that was changed a while ago. 
The way to 
> test your script is to run it from within the Script-Fu console.
> 
> -- 
> Cheers!
> 
> Kevin.
> 
> http://www.ve3syb.ca/           |"What are we going to do today, 
Borg?"
> Owner of Elecraft K2 #2172      |"Same thing we always do, 
Pinkutus:
>                                  |  Try to assimilate the world!"
> #include <disclaimer/favourite> |              -Pinkutus & the Borg
>



Photo 4 Less

[Gimp Developers]     [Gimp Users]     [Photos]     [Yosemite News]     [Yosemite Photos]    [Epson Inkjet]     [Scanner]     [Gimp's Home]     [Steve's Art]

Add to Google Powered by Linux