GIMP Chat
http://gimpchat.com/

(python-fu) wrap-map-bucket
http://gimpchat.com/viewtopic.php?f=9&t=12766
Page 1 of 1

Author:  dinasset [ Sat Jul 04, 2015 1:30 am ]
Post subject:  (python-fu) wrap-map-bucket

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

Author:  ofnuts [ Sat Jul 04, 2015 8:10 am ]
Post subject:  Re: (python-fu) wrap-map-bucket

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.

Author:  dinasset [ Sat Jul 04, 2015 10:37 am ]
Post subject:  Re: (python-fu) wrap-map-bucket

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

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/