Pals,

    As you noticed, this is my first plugin and I have many silly
questions... Sorry for bothering you with these.

    What my plugin does is an iterpolation to get rid of noise by
means of a classical local analysis of a square neighborhood or
radius r of each pixel to change it (if necessary) after the analysis.

    My plugin is working fine, using the 'gimp_pixel_rgn_set_row'
procedure and the shuffle raw function contained in

    http://developer.gimp.org/writing-a-plug-in/3/myblur5.c

I am already using this in big images (5MB or more).

    However, I saw that what is vastly used for plugins is
'gimp_pixel_rgns_register' with ONE iterator like:

    for (pr = gimp_pixel_rgns_register (1, &dest_rgn);
        pr != NULL; pr = gimp_pixel_rgns_process (pr))
      {
       ....
      }

or even TWO iterators like:

    for ( pr = gimp_pixel_rgns_register (2, &dest_rgn, &src_rgn);
        pr != NULL; pr = gimp_pixel_rgns_process (pr))
      {
         ......
      }

I don't really understand what these for loop do, except that it
somehow loops between the tiles.

    My questions: When to use one and when two iterators? Which one
should I use for a procedure like the one described in my plugin?
Is this indeed faster than the method I implemented based in myblur5.c?

    Thanks a lot,

        Luis.

_______________________________________________
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Reply via email to