Page 1 of 1

Error with .png convertion

Posted: 2011-08-28T06:16:07-07:00
by rafinakar
Hello,

When trying to convert on of my .png file's I get an error message:

C:\ImageMagick>convert "C:\next.png" "C:\next.jpg"
convert: invalid distance too far back `C:\next.png' @ error/png.c/MagickPNGErrorHandler/1728.
convert: Corrupt image `C:\next.png' @ error/png.c/ReadPNGImage/3689.
convert: missing an image filename `C:\next.jpg' @ error/convert.c/ConvertImageCommand/3015.

C:\ImageMagick>convert --version
Version: ImageMagick 6.7.1-0 2011-07-06 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP

Link to the file -> http://www.filefactory.com/file/cd46056/n/next.png

Can someone please check it out?


Thanks in advance,
Rafi.

Re: Error with .png convertion

Posted: 2011-08-28T06:57:30-07:00
by Bonzo
Thats a crappy site to put files on and my antivirus software flagged up a virus :?

I get the same errors on an older version of IM.

Re: Error with .png convertion

Posted: 2011-08-28T07:08:07-07:00
by rafinakar
I put the file on other server -> http://www.sendspace.com/file/oe8ksg

this is NOT a virus file and its not corrupted !


Thanks in advance,
Rafi.

Re: Error with .png convertion

Posted: 2011-08-28T13:54:05-07:00
by Bonzo
The file does not contain a virus there was something on the website that my antivirus software did not like.

Re: Error with .png convertion

Posted: 2011-08-28T14:18:11-07:00
by glennrp
The bad files were created with a very old compressor (not zlib). The bug
was fixed in that old software about 8-10 years ago. Sorry, I cannot remember
the name of that software now.

You can (or at least you could some years ago) "fix" the files with pngcrush.

Code: Select all

pngcrush -fix badfile.png goodfile.png
I believe it was necessary to use the "no-lib" version of pngcrush, not the
one that uses the system libpng/zlib. I'm not having much luck with either of
your "free download" sites. I'm not on a Windows system.

Re: Error with .png convertion

Posted: 2011-08-28T14:32:22-07:00
by glennrp
I remember now, it was "Image Lib" by colloseumbuilders, and the bug was fixed in 1998.
It's described on the PNG web site, at
http://www.libpng.org/pub/png/pngaptk.html

Re: Error with .png convertion

Posted: 2011-08-28T15:16:11-07:00
by glennrp
Fred sent me a copy of the image. "pngcrush" and "pngcheck" both say the
file is corrupted. The comment within it says it was made by ImageReady, not
Colluseumbuilders.

Re: Error with .png convertion

Posted: 2011-08-28T15:48:11-07:00
by fmw42
I got the file downloaded and IM gives the same error message as was originally posted. However, I can view it on my Mac using PREVIEW with no error message. On the otherhand, when trying with GraphicConverter, it gives a message about ZLIB reporting and error in the data stream and so thinks it is corrupt. However, it displays an image. Photoshop won't open it and thinks it is corrupt.