libgdx/libgdx — pull request #1812 by BlueRiverInteractive (2014-05-06 20:27:23+00:00)
Title: Added support for progressive JPEG

Using the public domain JPGD, JPEG compressor which can be found here: https://code.google.com/p/jpeg-compressor/

I've added an unsupported_format function to stb_image, which informs gdx2d to use JPGD in case it has returned 1. A wrapper class jpgd_c.h/cpp was created to allow C access of the namespaced jpgd::decompress_jpeg_image_from_memory method (If there is a simpler approach, please let me know). I also added a custom failure_reason method (similar to stb_image) to give more explanation why it failed.
It supports greyscale, RGB and RGBA format. However currently it seems to only give the correct image if 3 byte/px (RGB888) are requested. Maybe someone knows how to fix this?

I tested it on desktop (Mac64, Linux32) and iOS and it works as expected.