I proposed a merge: https://code.launchpad.net/~vinipsmaker/inkscape/libdepixelize/+merge/185237

The code is based on current practice, I think (grep is my friend). The changes between my choices and the code that inspired me was favoring C++ish interfaces when available.

I have to say that Inkscape is pretty huge and took me some time to finish this integration.

The whole libdepixelize was developed with Inkscape in mind and integration was very straigh forward. There are options to generate voronoi diagrams, B-Splines and optimized B-Splines. I'm still working on B-Splines optimization and it's not possible to get a optimized output right now, but the interface is done and after I implement this step the only update required will be a "libdepixelize release bumping", with no code changes required to Inkscape itself.

I went beyond Kopf-Lischinski to preserve more color information and the result is quite nice, but when you have a really evil gradient the result will be worse. The "worse" result is caused by a small bug (can and will be fixed) and have small artifacts (no crash, don't worry).

Also, I made a major refactor on a large part of the project that will make it 4 times more maintainable and greatly abstracts memory layout access. The memory layout access abstraction is important to implement the suggested improvement (cache oblivious algorithm) by Nathan Hurst.

I improved the "depixelize" binary, so it can be packed by distros.

This is what I remember so far, but there were a lot of changes and I'm sure I'm missing some one.

Now that I finished the Inkscape integration I'll be working on the B-Splines optimization.


--
Vinícius dos Santos Oliveira
https://about.me/vinipsmaker