RSS/Atom feed Twitter
Site is read-only, email is disabled

there is hope for gimp-perl-1.3 (was: red-eye-removal)

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

17 of 17 messages available
Toggle history

Please log in to manage your subscriptions.

Debugging? Douglas Lewan 16 Jun 04:35
  Debugging? Jeff Trefftzs 16 Jun 05:31
   Debugging? Carol Spears 16 Jun 08:04
    red-eye-removal (was: Debugging?) Dov Grobgeld 16 Jun 09:43
     red-eye-removal (was: Debugging?) Carol Spears 16 Jun 15:54
      there is hope for gimp-perl-1.3 (was: red-eye-removal) Marc) (A.) (Lehmann 16 Jun 21:57
       there is hope for gimp-perl-1.3 (was: red-eye-removal) Dov Grobgeld 16 Jun 22:31
        there is hope for gimp-perl-1.3 Marc) (A.) (Lehmann 16 Jun 23:54
         there is hope for gimp-perl-1.3 Marc) (A.) (Lehmann 17 Jun 00:36
          there is hope for gimp-perl-1.3 Joao S. O. Bueno 17 Jun 00:53
           there is hope for gimp-perl-1.3 Sven Neumann 17 Jun 01:23
       there is hope for gimp-perl-1.3 (was: red-eye-removal) Carol Spears 17 Jun 04:20
        there is hope for gimp-perl-1.3 (was: red-eye-removal) Marc) (A.) (Lehmann 17 Jun 10:08
         there is hope for gimp-perl-1.3 (was: red-eye-removal) Carol Spears 17 Jun 15:41
    Debugging? Sven Neumann 16 Jun 12:35
  Debugging? Sven Neumann 16 Jun 12:14
Debugging? Adam Sjøgren 16 Jun 11:11
Douglas Lewan
2003-06-16 04:35:46 UTC (almost 21 years ago)

Debugging?

Are there any Scheme debuggers that work with GIMP?

Are there any profilers?

Where's the right place to get documentation for GIMP primitives? I've been hunting through the C-code.

Thanks.

Jeff Trefftzs
2003-06-16 05:31:16 UTC (almost 21 years ago)

Debugging?

On Sun, 2003-06-15 at 19:35, Douglas Lewan wrote:

Are there any Scheme debuggers that work with GIMP?

Are there any profilers?

Where's the right place to get documentation for GIMP primitives? I've been hunting through the C-code.

The best place I've found for documentation on the GIMP primitives, at least with respect to scheme and Perl, is in the PDB browser that should have come with your GIMP. I use it heavily when I'm writing script-fus.

Debugging: you might try firing up the script-fu console in the GIMP and testing code snippets there. I've found this to work fairly well. My main problem is getting my head back into lisp space ...

HTH,

Carol Spears
2003-06-16 08:04:52 UTC (almost 21 years ago)

Debugging?

On 2003-06-15 at 2031.16 -0700, Jeff Trefftzs typed this:

Debugging: you might try firing up the script-fu console in the GIMP and testing code snippets there. I've found this to work fairly well. My main problem is getting my head back into lisp space ...

Eeek!

Jeff, just say no!

all three versions of gimp i have used, 1.0 1.2 and 1.3 have a nifty python plug-in complete with browser and console as well.

today i read two plug-ins for red-eye removal. the script-fu just looked like gibberish:
http://cs.uhh.hawaii.edu/~jeschke/photography/articles/gimp/RedEye2/red-eye.scm

this one. this was the saddest thing i ever read. i never want to read something this sad again. please. it is not the authors fault. it is not the fault of the person who ported gimp to it. nor the gtk guy that did it. not the original authors of this scripting language either. i don't know why it is so sad. you have to stop making me try to read this. mercy!
http://fmg-www.cs.ucla.edu/fmg-members/geoff/digicam/redeye

i would like to read it written in python. it is direct and the modular part is starting to make sense to me. it makes me angry (okay frustrated) not sad. that is better. please someone write this in python quick so we can compare before i forget!

carol

Dov Grobgeld
2003-06-16 09:43:03 UTC (almost 21 years ago)

red-eye-removal (was: Debugging?)

I just had a look at the two plug-ins for fun of it and they doing part of the problem differently, which means that the perl program looks more complicated than necessarry. The scheme plugin uses the plug-in plug-in-colors-channel-mixer to do the actual color mixing, whereas the perl plug-in accesses the pixels itself. Accessing pixels always gets dirty, because of the tile based approach of gimp. Actually, I think that Marc Lehmann's use of PDL for the job is very elegant. But I'm sure that it can be confusing to have to learn another huge sublanguage (which PDL is).

So if you want to compare syntax, please compare the same approach in the different languages.

I'm curious, does the python plug-in allow you to access the pixels?

Regards,
Dov

On Mon, Jun 16, 2003 at 02:04:52AM -0400, Carol Spears wrote:

On 2003-06-15 at 2031.16 -0700, Jeff Trefftzs typed this:

Debugging: you might try firing up the script-fu console in the GIMP and testing code snippets there. I've found this to work fairly well. My main problem is getting my head back into lisp space ...

Eeek!

Jeff, just say no!

all three versions of gimp i have used, 1.0 1.2 and 1.3 have a nifty python plug-in complete with browser and console as well.

today i read two plug-ins for red-eye removal. the script-fu just looked like gibberish:
http://cs.uhh.hawaii.edu/~jeschke/photography/articles/gimp/RedEye2/red-eye.scm

this one. this was the saddest thing i ever read. i never want to read something this sad again. please. it is not the authors fault. it is not the fault of the person who ported gimp to it. nor the gtk guy that did it. not the original authors of this scripting language either. i don't know why it is so sad. you have to stop making me try to read this. mercy!
http://fmg-www.cs.ucla.edu/fmg-members/geoff/digicam/redeye

i would like to read it written in python. it is direct and the modular part is starting to make sense to me. it makes me angry (okay frustrated) not sad. that is better. please someone write this in python quick so we can compare before i forget!

carol

Adam Sjøgren
2003-06-16 11:11:17 UTC (almost 21 years ago)

Debugging?

On Mon, 16 Jun 2003 02:04:52 -0400, Carol Spears wrote:

today i read two plug-ins for red-eye removal. the script-fu just looked like gibberish:
http://cs.uhh.hawaii.edu/~jeschke/photography/articles/gimp/RedEye2/red-eye.scm

this one. this was the saddest thing i ever read. i never want to read something this sad again. please.

Could you elaborate on what's sad about the above mentioned script?

And on why you think people shouldn't write such scripts?

Best regards,

Sven Neumann
2003-06-16 12:14:20 UTC (almost 21 years ago)

Debugging?

Hi,

Douglas Lewan writes:

Where's the right place to get documentation for GIMP primitives? I've been hunting through the C-code.

There is a complete API reference of libgimp installed with the GIMP. Have a look at $prefix/share/doc/gtk-doc/html/libgimp. If you install this reference next to the glib and gtk+ documentation, you get a full cross-referenced API documentation.

You should take a look at http://developer.gimp.org/ which has the API docs for GIMP-1.3 online as well a bunch of other interesting links.

Sven

Sven Neumann
2003-06-16 12:35:30 UTC (almost 21 years ago)

Debugging?

Hi,

Carol Spears writes:

today i read two plug-ins for red-eye removal. the script-fu just looked like gibberish:

http://cs.uhh.hawaii.edu/~jeschke/photography/articles/gimp/RedEye2/red-eye.scm

The URL is broken and you posted the corrected version to gimp-user... A working URL is here:

http://cs.uhh.hawaii.edu/~jeschke/photography/articles/gimp/RedEye2/red-eye.scm

this one. this was the saddest thing i ever read. i never want to read something this sad again. please. it is not the authors fault. it is not the fault of the person who ported gimp to it. nor the gtk guy that did it. not the original authors of this scripting language either. i don't know why it is so sad.

I don't see anything wrong with this script. Actually I'd be happy if all scripts would be as readable as this one.

Sven

Carol Spears
2003-06-16 15:54:42 UTC (almost 21 years ago)

red-eye-removal (was: Debugging?)

On 2003-06-16 at 1043.03 +0300, Dov Grobgeld typed this:

I just had a look at the two plug-ins for fun of it and they doing part of the problem differently, which means that the perl program looks more complicated than necessarry. The scheme plugin uses the plug-in plug-in-colors-channel-mixer to do the actual color mixing, whereas the perl plug-in accesses the pixels itself. Accessing pixels always gets dirty, because of the tile based approach of gimp. Actually, I think that Marc Lehmann's use of PDL for the job is very elegant. But I'm sure that it can be confusing to have to learn another huge sublanguage (which PDL is).

the perl plug-ins were/are wonderful. i use the heck out of some of them. i ask only not to have to *read* them anymore. something about that language makes this plug-in a sad read. i hope i did not say not to write them. it is the reading part that i cannot endure.

i have done everything that is humanly possible to get perl ported to gimp-1.3 and the plug-ins as well. okay, short of begging a scary hero. it is not my fault that it was easier to find people to rewrite them in other script. how about making a splash screen contest so i could show the splash that me and bit and cameron made?

i can't read it. and when i can, it can be chilling.

So if you want to compare syntax, please compare the same approach in the different languages.

I'm curious, does the python plug-in allow you to access the pixels?

Dov, i have no idea. i just know that i am able to use the little pieces. it doesn't allow my imagination to run away with me. i can start working on a plug-in (armed with a lot of little pieces located in two directories on my computer), get distracted, go back to it in a few weeks and still be able to figure out what was going on.

okay, in truth, i got stuck at the same place with both scripting languages on my cross-stitch plug-in. the point where the xpm gets read in and handled. when i get the chance, i think i can actually handle this with python, eventually and with a lot of help; but. i don't think i will ever be able to sort through it with perl. and i am truly humbled by those who can.

good heavens, please don't stop writing perl!

carol

On Mon, Jun 16, 2003 at 02:04:52AM -0400, Carol Spears wrote:

On 2003-06-15 at 2031.16 -0700, Jeff Trefftzs typed this:

Debugging: you might try firing up the script-fu console in the GIMP and testing code snippets there. I've found this to work fairly well. My main problem is getting my head back into lisp space ...

Eeek!

Jeff, just say no!

all three versions of gimp i have used, 1.0 1.2 and 1.3 have a nifty python plug-in complete with browser and console as well.

today i read two plug-ins for red-eye removal. the script-fu just looked like gibberish:
http://cs.uhh.hawaii.edu/~jeschke/photography/articles/gimp/RedEye2/red-eye.scm

this one. this was the saddest thing i ever read. i never want to read something this sad again. please. it is not the authors fault. it is not the fault of the person who ported gimp to it. nor the gtk guy that did it. not the original authors of this scripting language either. i don't know why it is so sad. you have to stop making me try to read this. mercy!
http://fmg-www.cs.ucla.edu/fmg-members/geoff/digicam/redeye

i would like to read it written in python. it is direct and the modular part is starting to make sense to me. it makes me angry (okay frustrated) not sad. that is better. please someone write this in python quick so we can compare before i forget!

carol

Marc) (A.) (Lehmann
2003-06-16 21:57:48 UTC (almost 21 years ago)

there is hope for gimp-perl-1.3 (was: red-eye-removal)

http://fmg-www.cs.ucla.edu/fmg-members/geoff/digicam/redeye

Woaw, a PDL plug-in not written by me! Oh my god, I can't believe it happened ;)

On Mon, Jun 16, 2003 at 09:54:42AM -0400, Carol Spears wrote:

perl ported to gimp-1.3 and the plug-ins as well.

One thing of interest is that I am currently working my way through the Gtk2 module(s) available for perl. Apart from some things I'd really like to have changed and settled to make use of it, this was the major obstacle to a gimp-perl-1.3.

Ok, that was a lie, the major obstacle was my lack of time, but now I don't have any other good excuses anymore. It might still take months, but at least I'd like to let you know that I am working on gimp-perl again, even if it's only "getting used to the Gtk2 internals".

(Gtk2 looks quite good already, btw..)

Dov Grobgeld
2003-06-16 22:31:16 UTC (almost 21 years ago)

there is hope for gimp-perl-1.3 (was: red-eye-removal)

On Mon, Jun 16, 2003 at 09:57:48PM +0200, Marc A. Lehmann wrote:

http://fmg-www.cs.ucla.edu/fmg-members/geoff/digicam/redeye

Woaw, a PDL plug-in not written by me! Oh my god, I can't believe it happened ;)

Yep, though the author missed the whole point of PDL by looping over x and y.

Instead of the loop the following code would have done the same thing much faster.

$rbrite = $data(0,:,:)* 0.5133333; $gbrite = $data(1,:,:);
$bbrite = $data(2,:,:)*0.193333;
$r = (($gbrite+$bbrite)/2/0.513333)->clip(0,255)->byte; $mask = ($rbrite >= $gbrite - $threshold) & ($rbrite>=$bbrite - $threshold); $data(0,:,:) .= $mask * $r + (1-$mask)*$data(0,:,:);

using the NiceSlice syntax. But it really doesn't make it any more legible... (It doesn't even look like perl...)

(Btw, I wonder if you couldn't use the PDL implicit threading model to loop over the tiles implicitely... Now I'm getting carried away.)

On Mon, Jun 16, 2003 at 09:54:42AM -0400, Carol Spears wrote:

perl ported to gimp-1.3 and the plug-ins as well.

One thing of interest is that I am currently working my way through the Gtk2 module(s) available for perl. Apart from some things I'd really like to have changed and settled to make use of it, this was the major obstacle to a gimp-perl-1.3.

Actually, I ported all the non-gui stuff already, which was really quite straight forward. I then started looking at perl-gtk-xs. What got me stuck is the fact that you created the various widgets by inheritance and perl-gtk-xs still doesn't support inheriting gtk widgets on the perl level. I'd be happy to send you the stuff that I have, but I really don't think that you need it.

Ok, that was a lie, the major obstacle was my lack of time, but now I don't have any other good excuses anymore. It might still take months, but at least I'd like to let you know that I am working on gimp-perl again, even if it's only "getting used to the Gtk2 internals".

(Gtk2 looks quite good already, btw..)

It sure does. :-)

Regards,
Dov

Marc) (A.) (Lehmann
2003-06-16 23:54:09 UTC (almost 21 years ago)

there is hope for gimp-perl-1.3

It seems that porting gimp-perl to 1.3 is about trivial, well, at least getting it to compile and run most scripts. The version in CVS compiles and runs, but the scripts using gtk fail (so better not install it or be prepared to skio a few plug-ins when running gimp-1.3).

In any case, although the perl-server and yinyang work fine, the "5-minute-port" features:

- a probably very high dependency on gimpcompat... if not the header file, then the symbols at least have the old names. - it still uses gtk1. porting the Gimp::Fu part itself should be easy, but gimp-perl uses some self-written classes, which is not yet supported the way I want it (sic!).

Anyway, it was an experiment, but it shows that the job is doable.

On Mon, Jun 16, 2003 at 11:31:16PM +0300, Dov Grobgeld wrote:

Woaw, a PDL plug-in not written by me! Oh my god, I can't believe it

Yep, though the author missed the whole point of PDL by looping over x and y.

Yeah, shame on me, I only noticed it *after* sending the mail. Ok, that's typical.

Instead of the loop the following code would have done the same thing much faster.

How about pacthing it and sending it to me for inclusion? *g*

Actually, I ported all the non-gui stuff already,

Great, I did it, too :() Ok, if you got gtk+ working, please send me what you did ;)

straight forward. I then started looking at perl-gtk-xs. What got me stuck is the fact that you created the various widgets by inheritance and perl-gtk-xs still doesn't support inheriting gtk widgets on the perl level.

Well, it does support it, sort of strangely-not-at-all-but-actually-it-does.

I'd be happy to send you the stuff that I have, but I really don't think that you need it.

well.. gimp-1.3 is surprisingly similar to 1.2 (ehy was everybody scaring me off? oh, nobody did.. hmm..).

In any case, I only did a rough get-it-compiling again. I hope you got a bit further, so yes, send it to me.

Marc) (A.) (Lehmann
2003-06-17 00:36:07 UTC (almost 21 years ago)

there is hope for gimp-perl-1.3

On Mon, Jun 16, 2003 at 11:54:09PM +0200, " Marc A. Lehmann " wrote:

Great, I did it, too :() Ok, if you got gtk+ working, please send me what you did ;)

OK, making it "run" (at night) with Gtk2 also wasn't difficult, but tooltips and lots of other things don't work yet (e.g. all the custom widgets).

However, gimp starts now without segfaults on the gtk2 scripts, so it should be possible to install gimp-perl on gimp-1.3 now without major problems when not using it.

Now, porting all the scripts is probably easy, but also quite some work (checking all scripts alone is some work to do).

I have some beginner questions, too (yes, you can flame me for not rtfm ;).

- why does the error/warning dialog ignore delete messages from the window manager? (I seem to have to click "OK" to get rid of them). - how do I set menu shortcuts, as in gimp-1.2?

Joao S. O. Bueno
2003-06-17 00:53:47 UTC (almost 21 years ago)

there is hope for gimp-perl-1.3

On Monday 16 June 2003 19:36, pcg@goof.com ( Marc) (A.) (Lehmann ) wrote:

I have some beginner questions, too (yes, you can flame me for not rtfm ;).

- why does the error/warning dialog ignore delete messages from the window manager? (I seem to have to click "OK" to get rid of them).

Sorry...I don´t know that.

- how do I set menu shortcuts, as in gimp-1.2?

But I do know this one:
you have to enable the dinamic shortcutting im File->preferences->interface->keyboard shortcuts

hmm...what about coming up with it turnned on as the default? If the idea is to make the things im GIMP more visible, why to hide this one?

Sven Neumann
2003-06-17 01:23:45 UTC (almost 21 years ago)

there is hope for gimp-perl-1.3

Hi,

"Joao S. O. Bueno" writes:

you have to enable the dinamic shortcutting im File->preferences->interface->keyboard shortcuts

hmm...what about coming up with it turnned on as the default? If the idea is to make the things im GIMP more visible, why to hide this one?

Because it interferes badly with mnemonics, especially if these are used in the menus and we only just started to add them all over the place. This is also the reason why they are disabled by default in all GTK2 apps.

Sven

Carol Spears
2003-06-17 04:20:03 UTC (almost 21 years ago)

there is hope for gimp-perl-1.3 (was: red-eye-removal)

On 2003-06-16 at 2157.48 +0200, Marc A. Lehmann typed this:

http://fmg-www.cs.ucla.edu/fmg-members/geoff/digicam/redeye

Woaw, a PDL plug-in not written by me! Oh my god, I can't believe it happened ;)

On Mon, Jun 16, 2003 at 09:54:42AM -0400, Carol Spears wrote:

perl ported to gimp-1.3 and the plug-ins as well.

One thing of interest is that I am currently working my way through the Gtk2 module(s) available for perl. Apart from some things I'd really like to have changed and settled to make use of it, this was the major obstacle to a gimp-perl-1.3.

Ok, that was a lie, the major obstacle was my lack of time, but now I don't have any other good excuses anymore. It might still take months, but at least I'd like to let you know that I am working on gimp-perl again, even if it's only "getting used to the Gtk2 internals".

anyone who can talk about their GIMP contribution in terms of months should only recieve my gratitude and awe. seriously. :)

thank you! carol

(Gtk2 looks quite good already, btw..)

i am only beginning to be able to see where gtk stops and gimp begins. and i am only running one gtk2 app right now, but everytime i build it, it looks better and runs smoother ....

months like before gimpcon2?

carol

Marc) (A.) (Lehmann
2003-06-17 10:08:32 UTC (almost 21 years ago)

there is hope for gimp-perl-1.3 (was: red-eye-removal)

On Mon, Jun 16, 2003 at 10:20:03PM -0400, Carol Spears wrote:

anyone who can talk about their GIMP contribution in terms of months should only recieve my gratitude and awe. seriously. :)

Ahem.. "in some months", not "for some months" :() The actual contribution might be relatively small, especially since it's not anymore a direct contribution to gimp, but a contribution to a different cvs module now.

In addition, i only "contribute" to projects when I need something for myself... so it's all purely egotistical.

months like before gimpcon2?

Good question... so far, it looks easier as expected.

Carol Spears
2003-06-17 15:41:54 UTC (almost 21 years ago)

there is hope for gimp-perl-1.3 (was: red-eye-removal)

On 2003-06-17 at 1008.32 +0200, Marc A. Lehmann typed this:

On Mon, Jun 16, 2003 at 10:20:03PM -0400, Carol Spears wrote:

anyone who can talk about their GIMP contribution in terms of months should only recieve my gratitude and awe. seriously. :)

Ahem.. "in some months", not "for some months" :() The actual contribution might be relatively small, especially since it's not anymore a direct contribution to gimp, but a contribution to a different cvs module now.

In addition, i only "contribute" to projects when I need something for myself... so it's all purely egotistical.

months like before gimpcon2?

Good question... so far, it looks easier as expected.

whee!

it is like the old days when i got gimp-perl because i wanted it :)

i was actually able to remember how to build a perl makefile on the first attempt.

thanks! just 'cause i don't want to read it, doesn't mean that i won't use it.

also, fyi, i needed to use perl to fix gimp-python while waiting for debian testing to upgrade their default python. so, well, there.

carol

-- We reject: kings, presidents, and voting. We believe in: rough consensus and working code. -- Dave Clark