[Gimp-developer] Re: perl-fu : cannot save image
On 2003-02-28 at 0102.48 +0100, Marc A. Lehmann typed this: > > I really wonder what is going on here, but there is a great deal of > confusion and misinformation going on... > i miss the perl plug-ins in gimp-1.3. are the developers, like me, waiting for someone to make gtk2 perl work? carol ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] perl-fu : cannot save image
On Thu, Feb 27, 2003 at 02:04:51PM +0100, Raphaël Quinet <[EMAIL PROTECTED]> wrote: > Note that I am not engaging in any kind of Perl-bashing here: Perl is my Indeed, you aren't. However, you get a lot of things wong: > - Gimp-Perl is broken and is not maintained Well, I don't know of anything like "gimp-perl is broken". I think that build problems that are due to people using the wrong compiler (like on irix), or problems with gtk-perl (that I am still not aware of) do not warrant such wording as "gimp-perl is broken". Also, gimp-perl not being maintained is news to me. Who claims this?? I was under the impression that I was the maintainer, and I certainly still maintain it. Where do you have this "gimp-perl is not maintained"? Or has the maintainer silently changed without the maintainer knowing it? I really wonder what is going on here, but there is a great deal of confusion and misinformation going on... -- -==- | ==-- _ | ---==---(_)__ __ __ Marc Lehmann +-- --==---/ / _ \/ // /\ \/ / [EMAIL PROTECTED] |e| -=/_/_//_/\_,_/ /_/\_\ XX11-RIPE --+ The choice of a GNU generation | | ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] perl-fu : cannot save image
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
Re: [Gimp-developer] perl-fu : cannot save image
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 ) thanks, valter On Thu, 27 Feb 2003 14:04:51 +0100 Raphaël Quinet <[EMAIL PROTECTED]> wrote: > On Wed, 26 Feb 2003 22:24:13 +0100, Valter Mazzola <[EMAIL PROTECTED]> wrote: > > ok but io want to create logos using existing script-fu logo script? > > it's possible > > Yes. One solution that does work with the current and future versions > of the GIMP is to write your whole script in Script-Fu. Do not try to > call Script-Fu from Perl (or from any other plug-in, for that matter) > because you will not get the expected results. Instead, write everything > in Script-Fu and you will get your logo as expected. > > Note that I am not engaging in any kind of Perl-bashing here: Perl is my > language of choice whenever I have to write some scripts or even some > rather complex programs. But as it stands currently, Gimp-Perl has some > problems (some of them inherited from Gtk-Perl bugs on some platforms, > some others due to the build/install process and some others due to the > fact that it is not maintained anymore) and will probably not be included > in the next release of the GIMP. So although Perl is a fine language, > the safest solution for the moment is to use Script-Fu, which is less > powerful but works well with the current and future versions of the GIMP. > > The bug report describing the incorrect behavior of Script-Fu when called > from other plug-ins can be found here: > http://bugzilla.gnome.org/show_bug.cgi?id=50649 > > So the short but confusing conclusion is: > - Script-Fu is broken (bug #50649) > - Gimp-Perl is broken and is not maintained > - The problem you see is mainly due to the script-fu bug mentioned above > and not to a problem in Perl, but the best solution is to use Script-Fu > only. > > -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
Re: [Gimp-developer] perl-fu : cannot save image
On Wed, 26 Feb 2003 22:24:13 +0100, Valter Mazzola <[EMAIL PROTECTED]> wrote: > ok but io want to create logos using existing script-fu logo script? > it's possible Yes. One solution that does work with the current and future versions of the GIMP is to write your whole script in Script-Fu. Do not try to call Script-Fu from Perl (or from any other plug-in, for that matter) because you will not get the expected results. Instead, write everything in Script-Fu and you will get your logo as expected. Note that I am not engaging in any kind of Perl-bashing here: Perl is my language of choice whenever I have to write some scripts or even some rather complex programs. But as it stands currently, Gimp-Perl has some problems (some of them inherited from Gtk-Perl bugs on some platforms, some others due to the build/install process and some others due to the fact that it is not maintained anymore) and will probably not be included in the next release of the GIMP. So although Perl is a fine language, the safest solution for the moment is to use Script-Fu, which is less powerful but works well with the current and future versions of the GIMP. The bug report describing the incorrect behavior of Script-Fu when called from other plug-ins can be found here: http://bugzilla.gnome.org/show_bug.cgi?id=50649 So the short but confusing conclusion is: - Script-Fu is broken (bug #50649) - Gimp-Perl is broken and is not maintained - The problem you see is mainly due to the script-fu bug mentioned above and not to a problem in Perl, but the best solution is to use Script-Fu only. -Raphaël ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Preview requirements
On Thu, 27 Feb 2003 00:49:50 +0100 "Branko Collin" <[EMAIL PROTECTED]> wrote: > Sometimes, a rendering algorithm is very slow. I know this all too well. > A user should be able > to switch off the automatic rendering of a preview. I don't think this is part of the preview widget. It calls the plug-in to do the rendering and that seems the proper place to make the decision about rendering a new image or not. greetings, Ernst ___ Gimp-developer mailing list [EMAIL PROTECTED] http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Re: Error in Script-fu !
On Wed, 26 Feb 2003 19:22:32 -0500 Carol Spears <[EMAIL PROTECTED]> wrote: > On 2003-02-26 at 2143.29 +0100, Branko Collin typed this: > > On 26 Feb 2003, at 10:30, Valter Mazzola wrote: > > > > > i'm executing this line in gimp 1.2.3 Script-Console , linux Mandrake > > > 9.0 intel: > > > > > > => (script-fu-alien-glow-logo 0 "hello" "150" > > > "-*-utopia-bold-r-*-*-150-*-*-*-*-*-*-*" '(255 0 0) ) > > > > > > the console gives: > > > > > > ERROR: wta(1st) to quotient (errobj hello) > > > > I don't know, it looks like it should work, but it doesn't. > > > i wonder where you got your fonts from. utopia is missing from the > sharefonts i got from debian. I don't remeber precisely... >From Mandrake 9.0 itsel or imported from Win with mandrake tool. > > carol > > ___ > 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