Erik, I think you're running in 32bpp mode, right?

To have 'png' render RGB24.png correctly make the following change to
/sys/src/cmd/jpg/png.c:

% yesterday -d png.c
diff /n/dump/2009/0304/sys/src/cmd/jpg/png.c /sys/src/cmd/jpg/png.c
139c139
<       Image *i, *i2;
---
>       Image *i, *i2, *i3;
205c205,207
<               image = i2;
---
>               i3 = allocimage(display, c->r, RGB24, 0, 0);
>               draw(i3, i2->r, i2, nil, i->r.min);
>               image = i3;

what this does is "filter" thr 32-bit alpha blended original through a
24-bit RGB image. this circumvents the bug by avoiding the conversion
from 32-bit image to a 32-bit display.

alternatively, you can try going down to 24bpp.


i am not competent to dig through the parts of memdraw in order to fix
this, so i won't offer to do it :)

Reply via email to