jerith / depixel

Depixeling tool, based on "Depixelizing Pixel Art".
MIT License
222 stars 30 forks source link

This is an implementation of the "Depixelizing Pixel Art" algorithm:

http://research.microsoft.com/en-us/um/people/kopf/pixelart/

This code is provided under the MIT license, the full text of which is in the LICENSE file. As far as I know, the algorithm is not covered by any patents or restrictive copyright.

This is very much a work in progress at present. My primary aim is to build a tool to generate outline fonts from low-resolution bitmap fonts, but that isn't ready yet.

So far I have the basic pixel grid deformation, shape outline extraction and somewhat wonky curve smoothing implemented and I can write representations of the intermediate steps to PNG and SVG. (The curve smoothing is pretty experimental, and probably full of exciting bugs. It also operates on each shape individually, so there's weirdness along the edges.)

There is a handy script to depixel PNGs in the depixel/scripts directory, and there are unit tests covering some of the code.

I like to keep dependencies small and light, but there are some useful bits I've pulled in (or will pull in) to make life easier: