Re: [Gimp-developer] newbie: how to scan lines?

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

 




Just to add a bit to Sven's response:

"balachandran c" <balachandran_c@xxxxxxxxxxxxxx> writes: 

>    I am writing a plugin which requires comparing one row of pixels with
>    the one following it. . . . how should it be done?

There are lots of examples in the GIMP source that you can look at.
Among the simplest is plug-ins/common/blur.c.

>    One part of the algorithm involves quantizing the image, and the other
>    involves user input. They are independent steps. Is it advisable to
>    use one thread to launch the quantizing step, while the other waits
>    for user input? 

Usually what I do in a situation like this is to have the time-consuming
code at intervals execute a little chunk of code like this:

while (gtk_events_pending ())
  gtk_main_iteration ();

This processes all Gtk+ events that have occurred since the last check,
and then returns control to the function.

Best,
  -- Bill
 

 
______________ ______________ ______________ ______________
Sent via the CNPRC Email system at primate.ucdavis.edu


 
                   

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux