JPG and PNG decoder

cal callumenator at
Sun Jun 17 00:55:19 PDT 2012

On Sunday, 17 June 2012 at 07:07:35 UTC, Philippe Sigaud wrote:
> Still, I'm interested in writing a JPEG/PNG to disk from a
> ubyte[3][][], or whatever.

Do you mean that you want to encode a ubyte array to disk as 
JPEG/PNG? Encoding a JPEG would be a bit of work I think, the 
format's kind of a monster. PNG should be easier, depending on 
how good you want the compression to be. If you don't care too 
much about compression level, you simply zlib compress the data, 
write it out by image row/scanline, include appropriate header 
and chunk info, and you're done. I'll give a simple encoder a go 
if you think you could use it.


More information about the Digitalmars-d-announce mailing list