JPG and PNG decoder

cal callumenator at gmail.com
Sat Jun 16 12:10:58 PDT 2012


I've been working on decoders for simple (baseline) JPEG and 
PNG's, mostly for my own amusement, and they seem to work ok now, 
so if anyone has need of some simple D modules to load these 
formats you can grab them here:
https://github.com/callumenator/imaged

Notes:
- Will load 8-bit baseline sequential JPEG's only. All PNG image 
types are supported (only critical chunks are decoded however).
- Can load from a stream or a file. In the case of the PNG's, 
this allows progressive display with an interlaced image.
- I haven't put much effort into speeding up these routines, and 
have not tested the JPEG decoder extensively, so there are bound 
to be bugs and there is plenty room for improvement.
- The example shows stream usage, and uses Adam Ruppe's 
simpledisplay to make a little viewer, that can flick through all 
images in a directory.

Cheers,
cal


More information about the Digitalmars-d-announce mailing list