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

numpy Docs

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.

2 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

48E0A399.8040507@web.de 07 Oct 20:26
  numpy Docs paul taney 29 Sep 15:06
   numpy Docs Samuel 29 Sep 16:29
paul taney
2008-09-29 15:06:08 UTC (over 16 years ago)

numpy Docs

I made a speed test with Python and found out that it's too slow for pixel ops. I change to C now. Furthermore the docs for a C plugin are much better than these for Python.

Hi Sam,

Thanks for your response.

Sven seems to know alot about it, he thinks python speed is good.

That would be because people are leveraging numpy and pixel_regions. You can blit to a pr in a flash, afaict. I have not done timing tests.

I recommend you look over this page:

http://www.scipy.org/Numpy_Example_List_With_Doc

...then see how people are blitting numpy arrays into pixel_regions. AFAICT that is the deep secret. And find Travis Oliphants book on numpy; it"s 350 pages. He just freed it about two weeks ago.

Now, if I could ask for your help on my little problem, I just dont know how to treat only a rectangular selection in my plugin (and return a result as a new layer). That would be a big help. Check out the attachment when you have some time.

It is beginning to behave -- on my dataset, weather charts.

See you, paul

Samuel
2008-09-29 16:29:30 UTC (over 16 years ago)

numpy Docs

Maybe when you save the selection at the beginning of the plugin with

selection = drawable.image.selection #The selection mask for the image. bounds = drawable.mask_bounds #The bounds of the drawable's selection. #or like in feca_hdr: http://registry.gimp.org/node/4752 self.sel_x1, self.sel_y1, self.sel_x2, self.sel_y2 = drawable.mask_bounds

But like I said, I don't know anything about Python, I just had a look at the old docs at
http://www.gimp.org/docs/python/index.html

paul taney wrote:

I made a speed test with Python and found out that it's too slow for pixel ops. I change to C now. Furthermore the docs for a C plugin are much better than these for Python.

Hi Sam,

Thanks for your response.

Sven seems to know alot about it, he thinks python speed is good.

That would be because people are leveraging numpy and pixel_regions. You can blit to a pr in a flash, afaict. I have not done timing tests.

I recommend you look over this page:

http://www.scipy.org/Numpy_Example_List_With_Doc

...then see how people are blitting numpy arrays into pixel_regions. AFAICT that is the deep secret. And find Travis Oliphants book on numpy; it"s 350 pages. He just freed it about two weeks ago.

Now, if I could ask for your help on my little problem, I just dont know how to treat only a rectangular selection in my plugin (and return a result as a new layer). That would be a big help. Check out the attachment when you have some time.

It is beginning to behave -- on my dataset, weather charts.

See you, paul