#691 Use libdepixelize as scaler


I just stumbeld upon https://launchpad.net/libdepixelize while reading the tentative releasenotes for inkscape 0.91 and thought it might be worth using libdepixelize as a scaler for ScummVM. I did not look into the technical feasibility of this, but just wanted to share this finding.


  • Torbjörn Andersson

    The idea has come up in the past, probably fuelled by the impressive results in the original article. However, they do list a few limitations. The algorithm isn't always suited for images that have a lot of colours, and/or use a lot of dithering, and - most damning - it's not (yet?) optimized for real-time use.

    But I didn't know until now that there was an implementation of the algorithm. I was able to compile the "kopftracer2011" program (which was much more of a hassle than it should have been) and tried it out. Now, bear in mind that my computer is several years old, and since I don't know anything about the algorithm I went with the default settings for everything.

    Kopftracer produces SVG images. I rendered them in Inkscape and exported them as 640x400 pixel PNG images.

    I used four different source images:

    1) The first room of Monkey Island 2. This one uses 256 colours, and has a lot of dithering which might make it badly suited for this kind of scaler, but it's what a lot of the games we support do.

    2) The first room of Loom. This one uses only 16 colours, but has a lot of checkerboard patters.

    3) A closeup of Elder Atropos from Loom. I figured this one should scale pretty well. It has lots of hard edges, and just a little bit of checkerboard patterns.

    4) The first room from King's Quest I (AGI version). Graphics don't get much simpler than this for the games we currently support.

    For my first test run, I pre-scaled the images to 640x400 pixels using the simple 2x scaler. Scaling the images took approximately 7.5 minutes, 7.5 hours (yes, hours), 36.5 minutes and 1.5 hours respectively.

    For my second test run, I used unscaled 320x200 pixel images. This time the scaling was much faster, taking approximately 1 minute, 30.5 minutes, 2.5 minutes and 6 minutes respectively.

    Quality-wise, the results are incluclusive. Some parts look better when using the 320x200 image as input, others look better when using the 640x400 image as input. But either way, I think it's pretty clear that libdepixelize is useless for our purposes, unless it gets optimized a lot or you are running it on some hypothetical future computer from space.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks