bulia wrote:
Works! Though it is very slow for large images, almost as good as a dead freeze. To make it usable, we need to provide a progress bar and to make it interruptible in some way. Another problem is that it puts the path into 0,0 instead of overlaying the original image; look up sp_selection_tile in selection-chemistry that solves a similar problem for Tile.
Yeah, it's full of little problems for now. I just wanted to get something out there that people could see. The pathlist that is generated has the x,y coordinates relative to the top/left of the image. All we need to do is copy the x/y attribute of the <image> itself to the <path> and we can fix this.
Path simplify works well to reduce the number of nodes. However, I'm sure there there is a tolerance setting or something in Potrace for estimating the curve and controlling the number of nodes output.
I noticed the delay. At first, I thought it was the text output/repr parsing that was slowing it down, but it is not. The tracing takes all of the time, and the output is very quick. I'll look at the tiling stuff you mentioned. Maybe execute this in a thread? Maybe not; we might -want- the user to see the delay, so he realizes that it is an expensive operation on large images.
Hey, we need an animated 'Busy' icon. How about a potato sleeping on a couch? ;-) Would be appropriate for many of us coders!
Bob