png decoder (update: encoder)

Lutger lutger.blijdestijn at gmail.com
Mon Jan 8 18:34:01 PST 2007


Lutger wrote:
> Perhaps somebody finds it useful: I've ported LodePNG, a small and 
> simple png decoder to D.(1 function call, life doesn't get easier than 
> this). There's also an encoder part, which I have not ported yet.
> 
> You can get it here: lutger.ifastnet.com/png.d
> Documentation: lutger.ifastnet.com/png.html
> 
> Port is straightforward, no attempt to change things much except some 
> raw pointers to arrays and replaced zlib routine by Phobos ones. Also 
> not tested much.

The encoder is now ported too, along with some other improvements. It 
only encodes 32 bit RGBA images and if it fails, it does so without 
giving errors.

The module is changed from png.d to lodepng.png.d. DSSS is not updated yet.

This port still needs some work and testing. I will improve the code and 
fold in updates from the original.

If you use it and find a bug or have some suggestion, do let me know.




More information about the Digitalmars-d-announce mailing list