Re: numpy Docs

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

 



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
>   

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

[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