Re: [Gimp-developer] - Addit. Questions - perl-fu : cannot saveimage

2003-02-28 Thread Raphaël Quinet
On Fri, 28 Feb 2003 09:52:18 +0100, Valter Mazzola <[EMAIL PROTECTED]> wrote:
> Your script is 
> Perfect Raphaël !  

Thanks!

> I've other questions:
> 1) When i run the script, i've a gimp window with the image created.
>I want to close it before leaving the script,
>I've done a (gimp-delete-image img) BUIT WITH NO effects.

Search in the DB browser for "gimp-display-delete".  This is probably what
you want.  Leep in mind that an image can have multiple views/displays.

> 2) Can i activate gimp with no visual interface at all AND the 
>script-fu server from the command line and but in in background under linux ?

Hmmm...  If "gimp -i" or "gimp --no-interface" does not do what you want,
you can run it with a virtual display such as Xvfb.  This is explained
in this tutorial: http://gug.sunsite.dk/tutorials/tomcat17/

Also, search for "server" in the DB browser.  You will find the
documentation of "extension-script-fu-server".

-Raphaël
___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] - Addit. Questions - perl-fu : cannot saveimage

2003-02-28 Thread Valter Mazzola
Your script is 
Perfect Raphaël !  


I've other questions:

1) When i run the script, i've a gimp window with the image created.

   I want to close it before leaving the script,

   I've done a (gimp-delete-image img) BUIT WITH NO effects.



2) Can i activate gimp with no visual interface at all AND the 
   script-fu server from the command line and but in in background under linux ?

thanks,
Valter.



On Thu, 27 Feb 2003 16:46:52 +0100
Raphaël Quinet <[EMAIL PROTECTED]> wrote:

> On Thu, 27 Feb 2003 14:37:36 +0100, Valter Mazzola <[EMAIL PROTECTED]> wrote:
> > Dear Raphaël
> > 
> > can you make an example script that calls a script-fu- logo scripts and save it?
> > 
> > for example this one doesn't save correctly the image: 
> > 
> > (begin
> >   (let* 
> >  (
> >  (image  (car (   (script-fu-alien-glow-logo "hello hello"  150 
> > "-*-utopia-bold-r-*-*-150-*-*-*-*-*-*-*"  '(255 0 0))))   )
> > ; (image (car (gimp-file-load 0 "/root/clock.gif" "/root/clock.gif")))
> >  (drawable  nil)
> >  )
> >
> >   (set! drawable  (car (gimp-image-flatten image)))
> >   (gimp-file-save 1 image drawable "/root/a.png" "/root/a.png")
> >   (gimp-image-delete image)
> >   ) ;let
> > )
> 
> There are a few problems in your script, such as the extra parenthesis before
> the call to script-fu-alien-glow-logo.  Also, one thing that is not really
> obvious is that the script returns one more than the index of the new image
> (don't ask me why).  So here is a modified version of the script that should
> work:
> 
> (define (script-fu-blahblah outfile)
>   (let* ((img (- (car (script-fu-alien-glow-logo "hello hello" 150 
> "-*-utopia-bold-r-*-*-150-*-*-*-*-*-*-*" '(255 0 0))) 1))
>(drawable (car (gimp-image-flatten img
> (gimp-convert-indexed img 1 0 255 0 1 "")
> (file-png-save 1 img drawable outfile outfile 0 9 0 0 0 0 0)))
> 
> You can also register this script in the menus:
> 
> (script-fu-register "script-fu-blahblah"
>   "/Xtns/Script-Fu/Blahblah"
>   "Blah blah blah!"
>   "me"
>   "me"
>   "2003-02-27"
>   ""
>   SF-FILENAME "Outfile" "outfile.png")
> 
> Or if you want to invoke it directly from the command line in batch mode,
> then you can replace the "(define ...)" with "(begin ...)" as you did in
> your example and directly replace the value of "outfile" with the name of
> the file in which you want to save the results.
> 
> -Raphaël
> ___
> Gimp-developer mailing list
> [EMAIL PROTECTED]
> http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


-- 
Valter Mazzola - Software/Databases for Enterprise Web Sites
  Java, Jsp, ASP, PHP, PERL, Mod_Perl, PL/SQL, Apache,IIS
  C/C++, Oracle, SQL Sever, PostgreSQL, MySQL, Access.
http://SitiDinamici.com/ 
Phone:(+39) 347/129-07-16.  Fax:(+39) 02/700-539-403
___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer