Error with .png convertion

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
rafinakar
Posts: 2
Joined: 2011-08-28T06:05:04-07:00
Authentication code: 8675308

Error with .png convertion

Post 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.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Error with .png convertion

Post 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.
rafinakar
Posts: 2
Joined: 2011-08-28T06:05:04-07:00
Authentication code: 8675308

Re: Error with .png convertion

Post 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.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Error with .png convertion

Post by Bonzo »

The file does not contain a virus there was something on the website that my antivirus software did not like.
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: Error with .png convertion

Post 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.
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: Error with .png convertion

Post 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
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: Error with .png convertion

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Error with .png convertion

Post 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.
Post Reply