Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Include deinterlacing code from LodePNG in PNGDecoder #258

Closed
wants to merge 1 commit into from

Conversation

somaen
Copy link
Member

@somaen somaen commented Jul 18, 2012

This is a stripped down version of the deinterlacing code used in LodePNG, http://lpi.googlecode.com/svn/trunk/lodepng.cpp code for handling lower bitPerPixel-amounts than 8 was removed, as that should be an uncommon case for the uncommon case that interlaced PNGs are, and it added even more complexity.

It's worth noting that this does not work 100%, almost all the images I threw at it deinterlaced fine, but two proved to be problematic:
https://dl.dropbox.com/u/12443522/ircfiles/fonts-fontmenupismo.png
https://dl.dropbox.com/u/12443522/ircfiles/denicek-denicek.png

Putting the result out again as BMP (for lack of a way to put out PNG) reveals the following:
https://dl.dropbox.com/u/12443522/ircfiles/denicek-denicek-deinterlaced.bmp
https://dl.dropbox.com/u/12443522/ircfiles/fonts-fontmenupismo-deinterlaced.bmp

Both images are from Five Magical Amulets, and the rest of the interlaced data there does work fine.

So:
Is the code otherwise good?
Do anyone have any idea what is wrong for the two failed images?

Edit: Corrected title

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants