Bug 144268 - Showfoto unable to open some png file
Summary: Showfoto unable to open some png file
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-DImg-PNG (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-15 21:36 UTC by rapsys
Modified: 2019-07-27 19:51 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.2.0
Sentry Crash Report:


Attachments
Original png (fail) (638.89 KB, image/png)
2007-04-15 21:37 UTC, rapsys
Details
Same png but saved from gimp (works) (504.85 KB, image/png)
2007-04-15 21:39 UTC, rapsys
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rapsys 2007-04-15 21:36:59 UTC
Version:           0.5.0 (using KDE 3.5.4, compiled sources)
Compiler:          Target: i586-mandriva-linux-gnu
OS:                Linux (i686) release 2.6.20-tmb-desktop-2mdv

In fact i noticed some problem with some png.

Showfoto is completely unable to open them and issue an error.

If i open the png in gimp2, then save it, then re-open with showfoto it works.

I attached an example
Comment 1 rapsys 2007-04-15 21:37:52 UTC
Created attachment 20281 [details]
Original png (fail)
Comment 2 rapsys 2007-04-15 21:39:02 UTC
Created attachment 20282 [details]
Same png but saved from gimp (works)
Comment 3 caulier.gilles 2007-04-15 22:25:50 UTC
When i try to load the broken image in showfoto, libpng return an error :

libpng error: incorrect header check

This is want mean than your image is corrupted. Thi sis not a problem with showfoto, but with libpng.

Gilles Caulier
Comment 4 rapsys 2007-04-17 11:48:56 UTC
I don't think it's only a libpng bug...

As the thumnail generation of the file works perfectly (even in showfoto)

Si i think there is a bug in showfoto
(gimp use libpng too, so it should be fail then too)
Comment 5 Giorgos Pallas 2007-09-22 10:10:48 UTC
I also have the same problem. The fact is that I haven't been able to open any .png with showfoto, except from the one that rapsys has uploaded (the one saved from gimp I mean).

And I don't think it's a libpng problem because many of the files that I get an error trying to open were created for example by PhotoShop. In addition to that, all those pngs open just fine using other kde applications (kview for example).
Comment 6 Roland Wolters 2007-09-26 15:16:07 UTC
The same is true for me:
There are several png images I have which worked perfectly in digikam before, but now fail to be opened. Other applications have no problem at all.

My libpng version is 1.2.16, the digikam version is 0.9.2
Comment 7 caulier.gilles 2007-09-26 16:08:02 UTC
I confirm that it's a bug in libpng.

On my computer (Mandriva 2007.1 + cooker RPMs) i have this issue:

* with libpng 1.2.13 = digiKam for KDE3 or KDE4 is not able to thumb/preview/load png image provided by rapsys.

* to update libpng to 1.2.19, problem has desapears...

Note : showfoto == digiKam image editor. Issue is reproductible in showfoto for KDE3 or KDE4

Gilles
Comment 8 caulier.gilles 2007-09-26 16:10:35 UTC
Notes:

- i have used current code of digiKam 0.9.3 from svn, not 0.9.2.

- i have recompiled digiKam of course after to update libpng.

Gilles
Comment 9 Roland Wolters 2007-12-15 12:56:00 UTC
The problem is still valid for me with libpng 1.2.22 and showfoto.
Showfoto is the only image program I have which has problems opening these files - all others I've tested (Kuickshow, KView, Gwenview, Gimp, ooDraw) worked.
Comment 10 Arnd Baecker 2007-12-15 13:55:58 UTC
Just to be sure: are you using digikam 0.9.3-rc1 now?
(And you did recompile digikam after the update to libpng 1.2.22?)

What is the error message on the konsole?

What is the output of 
  ldd PATH/TO/DIGIKAM/digikam | grep png
(You can get the path via `which digikam` on the konsole)
Comment 11 Roland Wolters 2007-12-15 17:10:50 UTC
$ rpm -q digikam
digikam-0.9.2-5.fc8

The error in the konsole is the same as above:
libpng error: incorrect header check

$ ldd `which digikam`|grep png
        libpng12.so.0 => /usr/lib/libpng12.so.0 (0x00832000)

$ ll /usr/lib/libpng12.so.0
lrwxrwxrwx 1 root root 18  2. Nov 13:17 /usr/lib/libpng12.so.0 -> libpng12.so.0.22.0

About the rebuild: rom reports that digikam was rebuild in September - with an older version of libpng (1.2.22 was built in October). I will ask in bugzilla of Fedora for a rebuild of digikam.
Comment 12 Roland Wolters 2007-12-15 17:16:23 UTC
I meant rpm, not rom. Anyway, the related bug report in Fedora's bugzilla is here:
https://bugzilla.redhat.com/show_bug.cgi?id=425781
Comment 13 Arnd Baecker 2007-12-15 18:35:02 UTC
Of course, you could try to build digikam yourself, see the 
installation instructions at: http://www.digikam.org/?q=download/svn
in particular below "Install digiKam in your Home Directory"
(Don't hesitate to ask on digikam-users if you run into any problems ...)
Comment 14 Marcin Garski 2008-01-19 14:42:25 UTC
I have compiled digikam-0.9.2 (libpng-1.2.22) with enabled debug messages in pngloader.cpp:

showfoto: /home/marcin/bad.png : PNG file identified
showfoto: [virtual bool Digikam::PNGLoader::load(const QString&, Digikam::DImgLoaderObserver*)] PNG in >=8 bits/color/pixel.
showfoto: PNG in PNG_COLOR_TYPE_RGB
libpng error: incorrect header check
showfoto: [virtual bool Digikam::PNGLoader::load(const QString&, Digikam::DImgLoaderObserver*)] Internal libPNG error during reading file. Process aborted!
kio_digikamthumbnail: /home/marcin/bad.png : PNG file identified
kio_digikamthumbnail: [virtual bool Digikam::PNGLoader::load(const QString&, Digikam::DImgLoaderObserver*)] PNG in >=8 bits/color/pixel.
kio_digikamthumbnail: PNG in PNG_COLOR_TYPE_RGB
libpng error: incorrect header check
kio_digikamthumbnail: [virtual bool Digikam::PNGLoader::load(const QString&, Digikam::DImgLoaderObserver*)] Internal libPNG error during reading file. Process aborted!
kio_digikamthumbnail: /home/marcin/bad.png : PNG file identified
kio_digikamthumbnail: [virtual bool Digikam::PNGLoader::load(const QString&, Digikam::DImgLoaderObserver*)] PNG in >=8 bits/color/pixel.
kio_digikamthumbnail: PNG in PNG_COLOR_TYPE_RGB
libpng error: incorrect header check
kio_digikamthumbnail: [virtual bool Digikam::PNGLoader::load(const QString&, Digikam::DImgLoaderObserver*)] Internal libPNG error during reading file. Process aborted!
kio_digikamthumbnail: No relevant plugin found
Comment 15 caulier.gilles 2008-01-19 14:51:53 UTC
Look like libpng cannot open the file properlly. THis is not the fault to digiKam PNG loader i think...

Gilles Caulier
Comment 16 rapsys 2008-01-19 17:08:57 UTC
Le Saturday 19 January 2008 14:51:54 Gilles Caulier, vous avez écrit :
[bugs.kde.org quoted mail]

It is, cause gimp and other are loading the same png correctly, plz take a 
look at how they success open it...

It's ok in koffice-krita or gimp and even in gwenview, why showphoto or 
digikam is unable to open it ???
Comment 17 caulier.gilles 2008-03-19 12:27:14 UTC
Rapsy,

This entry still valid using showfoto 0.7.0 ?

Gilles Caulier
Comment 18 caulier.gilles 2008-12-10 19:24:46 UTC
Rapsy, 

This entry still valid using showfoto 0.8.0 ?

With no response from you, this file will be closed...

Gilles Caulier 
Comment 19 Giorgos Pallas 2008-12-10 21:55:28 UTC
(In reply to comment #18)
> Rapsy, 
> 
> This entry still valid using showfoto 0.8.0 ?
> 
> With no response from you, this file will be closed...
> 
> Gilles Caulier 
> 

Hello.

I quit using showfoto long time ago. Since you asked my, I re-installed it on my debian lenny (with all latest upgrades), and it still does not work. I downloaded the attachments, and the one is working and the other not...

aptitude show showfoto
Package: showfoto
New: yes
State: installed
Automatically installed: no
Version: 2:0.9.4-1
Priority: optional
Section: graphics
Maintainer: Debian KDE Extras Team <pkg-kde-extras@lists.alioth.debian.org>
Uncompressed Size: 2961k
Depends: kdelibs4c2a (>= 4:3.5.9), libc6 (>= 2.7-1), libgcc1 (>= 1:4.1.1), libjasper1 (>=
         1.900.1), libjpeg62, libkdcraw3, libkexiv2-3, liblcms1 (>= 1.15-1), libpng12-0 (>=
         1.2.13-4), libqt3-mt (>= 3:3.3.8b), libstdc++6 (>= 4.1.1), libtiff4, libx11-6, digikam
         (>= 2:0.9.1~rc2)
Recommends: kipi-plugins, kdeprint, konqueror
Conflicts: digikam (<= 2:0.9.0-1), digikamimageplugins (< 2:0.9.0~rc2)
Replaces: digikam (<= 2:0.9.0-1)
Description: image viewer/editor for KDE
 Showphoto is part of the Digikam project. It allows to browse your photo collection and edit
 them with ease.
Homepage: http://www.digikam.org
Comment 20 Mikolaj Machowski 2008-12-11 00:00:11 UTC
Confirming for showfoto 0.10.0-beta7 (rev.: 894962)

relevant konsole output (note that I can see thumbnail contrary to one of lines below - only main image isn't loaded):

libpng error: incorrect header check
Style reset requested.
libpng error: incorrect header check
showfoto(2626)/digikam (core) Digikam::ThumbnailCreator::load: Cannot create thumbnail for  "/home/mikolaj/test.png"

showfoto(2626)/digikam (core) Digikam::EditorWindow::slotLoadingFinished: Failed to load image  "test.png"

showfoto(2626)/digikam (core) Digikam::DImgInterface::getImg: d->image is NULL
Comment 21 Mikolaj Machowski 2008-12-11 00:04:45 UTC
#20 Forgot: I can see thumbnail but it is not scaled to fit into its place - I see only fragment.
Comment 22 Marcel Wiesweg 2008-12-11 19:18:48 UTC
The test image is interlaced, so this is a dup of bug 149875

*** This bug has been marked as a duplicate of bug 149875 ***
Comment 23 caulier.gilles 2019-07-27 19:51:06 UTC
Fixed with bug #149875