JPG and PNG decoder

Stewart Gordon smjg_1998 at
Sun Jun 17 16:17:48 PDT 2012

On 17/06/2012 14:38, Philippe Sigaud wrote:
> On Sun, Jun 17, 2012 at 3:25 PM, Stewart Gordon <smjg_1998 at> wrote:
>> FWIW a while ago I wrote a simple experimental program that generates an
>> image and encodes it as a PNG.  And I've just tweaked it and updated it to
>> D2 (attached).  It supports only truecolour with 8 bits per sample, but it
>> supports filtering, though it isn't adaptive (you just specify the filter to
>> use when you run the program).
> Nice one, works OK here! (DMD 2.059, Linux 32bits)
> (DMD -property asks for '@property' after IHDR bigEndian())

Good catch.  It's probably time we deprecated using property syntax on non-properties.

> You two should fuse it into one module, to give us loading/writing.
> That would be quite cool.

I don't know how much of the code will need rewriting in order to support interlacing or 
all PNG colour types/depths.

But I also began writing a PNG library a while back - with the intention that it will be a 
full PNG editing library, not just encoding/decoding of the image data.  But I haven't had 
much time to work on it recently.  And it would help a lot if we could have the 
replacement for some time soon.


More information about the Digitalmars-d-announce mailing list