2.39: Error opening png file

Bugs found in XnView Classic. Please report only one bug per topic!

Moderators: XnTriq, xnview

Stepa_ua
Posts: 2
Joined: Sat Nov 26, 2016 12:06 am

2.39: Error opening png file

Postby Stepa_ua » Sat Nov 26, 2016 12:32 am

I use Win7 x64. After the XnView updating to version 2.39 I have found out that it is impossible to open one of graphic files.

The error of reading is shown only on this file, other png files open without problems.
Attachments
SoftJig.png
SoftJig.png (13.25 KiB) Viewed 510 times

User avatar
XnTriq
Moderator & Librarian
Posts: 5006
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: 2.39: Error opening png file

Postby XnTriq » Sat Nov 26, 2016 3:45 am

Welcome to the forum, Stepa_ua.

I can confirm that XnView Classic v2.37 and v2.39 as well as MP v0.83 don't like SoftJig.png. I had no problem viewing it with v1.99 though, and TweakPNG gives it a clean bill of health.

Update:

p136095.png
Windows Picture and Fax Viewer
p136095.png (19.37 KiB) Viewed 499 times

User avatar
xnview
Author of XnView
Posts: 27690
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 2.39: Error opening png file

Postby xnview » Sun Nov 27, 2016 10:40 am

The error is 'IDAT: invalid distance too far back', from Libpng they recommand to use "contrib/tools/pngfix", "pngcrush" to fix such bad file.
Pierre.

User avatar
XnTriq
Moderator & Librarian
Posts: 5006
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: 2.39: Error opening png file

Postby XnTriq » Sun Nov 27, 2016 12:00 pm

xnview wrote:The error is 'IDAT: invalid distance too far back', from Libpng they recommand to use "contrib/tools/pngfix", "pngcrush" to fix such bad file.

Thanks for the hint!

Code: Select all

pngcrush.exe X:\in\SoftJig.png X:\out\SoftJig.png

  Recompressing IDAT chunks in X:\in\SoftJig.png to X:\out\SoftJig.png
   Total length of data found in critical chunks            =     13573
While converting X:\in\SoftJig.png to X:\out\SoftJig.png:
  pngcrush caught libpng error:
   IDAT: invalid distance too far back

   Critical chunk length, method  12 (ws 15 fm 0 zl 0 zs 0) =        99

Code: Select all

pngcrush.exe -fix X:\in\SoftJig.png X:\out\SoftJig.png

  Recompressing IDAT chunks in X:\in\SoftJig.png to X:\out\SoftJig.png
   Total length of data found in critical chunks            =     13573
   Critical chunk length, method   1 (ws 15 fm 0 zl 4 zs 0) =     17795
   Critical chunk length, method   2 (ws 15 fm 1 zl 4 zs 0) >     17795
   Critical chunk length, method   3 (ws 15 fm 5 zl 4 zs 1) >     17795
   Critical chunk length, method   4 (ws 15 fm 0 zl 9 zs 1) =     13445
   Critical chunk length, method   7 (ws 15 fm 0 zl 9 zs 0) >     13445
   Best pngcrush method        =   4 (ws 15 fm 0 zl 9 zs 1) =     13445
     (0.94% critical chunk reduction)
     (0.94% filesize reduction)

p136130.png
Fixed version of SoftJig.png
p136130.png (13.13 KiB) Viewed 467 times

User avatar
helmut
Posts: 8116
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: 2.39: Error opening png file

Postby helmut » Sun Nov 27, 2016 1:36 pm

xnview wrote:The error is 'IDAT: invalid distance too far back', from Libpng they recommand to use "contrib/tools/pngfix", "pngcrush" to fix such bad file.
Thank you for checking, Pierre. Perhaps XnView can display a more detailed error message which points to the problem.

Stepa_ua
Posts: 2
Joined: Sat Nov 26, 2016 12:06 am

Re: 2.39: Error opening png file

Postby Stepa_ua » Sun Nov 27, 2016 8:39 pm

Thank you! This file is really easy to fix by using Pngcrush or OptiPNG.


Return to “Classic - Bug Reports”

Who is online

Users browsing this forum: No registered users and 2 guests