Re: png image scrambled
"Roland Winkler" <winkler-mXXj517/[email protected]> Fri, 23 Aug 2019 21:54:17 -0500
| Newsgroups | gmane.comp.graphics.png.general |
|---|---|
| Message-ID | <[email protected]> |
On Fri Aug 23 2019 Pavel Zlatovratskii wrote: > It's not looks like a bug in libpng and not corrupted image. > > Your image use fully transparent black as background using tRNS > chunk. Some software use neutral (grey or white) background and > image looks good. Other ignore transparency (and they are allowed > to do so as tRNS is an ancillary chunk) and draw background with > original black colour. > > You can check modified picture: three bytes black to white and > four bytes of CRC changed. Thanks a lot to everyone who replied to this thread. Now I understand much better how the problem comes about. The eog viewer lets the user choose a custom color for transparent parts. So with eog I happened to get for this picture what I was expecting to get because my eog was configured to use a white background. If I choose black instead, the figure is as "scrambled" as what I got from rpng. For GNU Emacs customizability is quite important. So it seems to me it would make sense that it allowed the user to choose a custom color for transparent parts of a png image similar to eog. I'll discuss this on an emacs mailing list. I assume that libpng supports this.