[conspire] [Gimp-user] PNG troubles
Rick Moen
rick at linuxmafia.com
Fri Aug 3 23:10:33 PDT 2018
Quoting Ruben Safir (ruben at mrbrklyn.com):
> On Wed, Aug 01, 2018 at 06:09:27PM -0700, Steve M Bibayoff wrote:
> > On Wed, Aug 1, 2018 at 5:00 PM, Ruben Safir <ruben at mrbrklyn.com> wrote:
> >
> > > Maybe you can right click on the PNG file and try to open it with the
> > > gimp and see if it renders on GNU/Linux.
> >
> > It opens fine for me with Gimp 2.8.16.
>
> not with 2.10.14
So, let me recap this matter (since there have been some cryptic and IMO
misleading bits), partly relying on your postings and partly on a
telephone conversation where you detailed the matter (thanks!):
A long time ago, like pretty much all of us running Web servers, you
started accumulating picture files in PNG format. PNG (Portable Network
Graphics) is a raster graphics format with lossless compresion designed
as a feature-equivalent (if not more so) replacement for the GIF format,
in part because the latter suffered patent problems because of the LZW
compression patent (expired June 2003) and other patents (all of which,
FWIW are gone now). PNG was first introduced in the middle '90s,
catching on strongly over the following decade.
You created your PNGs using utilities of the time that (perforce) used
PNG library versions (e.g., libpng) of that time. Like many of us
annoyed by the buttheaded attitudes of GIF stakeholders (I am guessing),
you even converted graphics from other raster formats (probably GIF) to
PNG for long-term use.
The problem emerged when newer PNG tools relying on newer PNG libraries
started treating various of your existing PNGs from early days as
invalid files. Upon examination, some probing using utilities you
yourself coded (but haven't finished) using the PNG specification (a
meritorious thing! and one hopes you will make that work available), a
likely explanation emerged:
The early PNG-processing software that created the files you stored in
your collection in early days, in some or all cases (in a version of
libpng shipped during a brief period in the year 2004) were stored
having incorrect checksum data stored within their internal metadata, an
error caused by faulty zlib compression software. However, this at the
time was not a showstopper for use and display of the images, because
the software you used to display them was not enforcing PNG checksums.
Time passed, and eventually newer versions of PNG-processing software
emerged that _do_ enforce checksums, with the result that the software
rejects those images as supposedly corrupted -- when they are not
actually corrupted, just stored with incorrect checksums.
If I have understood this course of events basically correctly in its
_primary_ aspects (irrespective of fine details), then the claim you've
posted a couple of times that there are fundamental problems with the
PNG format specification appear to be unsupported by the facts of your
problem. Your problem with early faulty zlib compression is of course
quite real, and I'm sure extremely annoying. You relied on the
(earlier) PNG software to create / convert valid files, just as you are
relying on the current software to interpret and display those files --
and are seeing those files treated as invalid today even though they
weren't before and are unchanged.
Your claim that PNG is wholly undependable and not a usable format is
_also_ grossly inaccurate. That is not supported by the facts of your
problem, either, and the problem doesn't even lie in the PNG chunk check
values at all, but rather in the zlib check value included as a
cross-check attempt to verify that the eflate and inflate algorithms are
implemented correctly. There is thus an infuriating legacy problem with
the treatment of (many) older PNG files, but that is not the same thing
as what you said, at all.
It appears that Cosmin Truta will be soon offering you a comprehensive
fix in the form of the 'special build of OptiPNG' that you can use to
mass-fix your PNGs stored with erroneous zlib check values using that
buggy libpng version available briefly during part of 2004.
So, happy ending for you.
Does that mean 'PNG files are wholely undependable and not a usable
format'? Hell no. And it's really bloody annoying to see you cry wolf
like that.
It means that software sometimes has bugs, and you got bit by one.
Sorry about that, but it's the way of the world.
More information about the conspire
mailing list