It is currently Fri Apr 26, 2024 12:09 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: (python-fu) wrap-map-bucket
PostPosted: Sat Jul 04, 2015 1:30 am  (#1) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Hi Ofnuts (and any other python/script guru around here).
I'm using (inside of one of my scripts) the wrap-map-bucket python plug-in.
As long as I used it on a moderately small image, no problem; today I launched it on a moderately big image (around 4000*3000); response time was half an hour!
I know this plug-in had always performance problems (inside the description it is written :
# v0.1: performance improvements, fix partially transparent pixels
# v0.2: some more performance improvements (thanks to saulgoode)

now my question is: is there room for new performance improvements?
thanks

_________________
"Where am I ?"


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: (python-fu) wrap-map-bucket
PostPosted: Sat Jul 04, 2015 8:10 am  (#2) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4739
Yes, rewrite in C(*). Each pixel of width in the border requires the creation of two selections plus a bucket fill. If you are filling a wide border, you can try to use fewer and wider strides, and then blur the result (Gaussian or spread noise).

(*) There could be other optimizations, but if SG or I would have thought about them, they would ave been implemented.

_________________
Image


Top
 Post subject: Re: (python-fu) wrap-map-bucket
PostPosted: Sat Jul 04, 2015 10:37 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
OK, Ofnuts, I understand.
I will do the following (the same I do with other my scripts which are using long running filters, like some G'MIC ones):
- rescale the image at the beginning (user option)
- perform all the processing (including your filter) on the rescaled image
- rescale back the image at the end

_________________
"Where am I ?"


Top
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Python rounded rectangle bucket fill problem

1

No new posts Line art detection bucket fill

0

No new posts Attachment(s) Stripes when doing a bucket fill with pattern

0

No new posts Bucket fill white comes out as grey

4

No new posts Attachment(s) Wrap all layers

4



* Login  



Powered by phpBB3 © phpBB Group