[showfoto] [Bug 319267] New: showfoto (3.0 or 3.1?) fails to save png file with libpng-1.6.x

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

[showfoto] [Bug 319267] New: showfoto (3.0 or 3.1?) fails to save png file with libpng-1.6.x

Andreas K. Huettel
https://bugs.kde.org/show_bug.cgi?id=319267

            Bug ID: 319267
           Summary: showfoto (3.0 or 3.1?)  fails to save png file with
                    libpng-1.6.x
    Classification: Unclassified
           Product: showfoto
           Version: 3.0.0
          Platform: Other
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [hidden email]
          Reporter: [hidden email]

This is a clone of https://bugs.gentoo.org/show_bug.cgi?id=466798

Saving a file into png format from `showfoto` (part of digikam) fails with
error "libpng error: profile 'icc': 1B0Ah: invalid length"
It was working with libpng:1.5

From the debug log:
>usr>src$ showfoto
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 9: reading
configurations from ~/.fonts.conf is deprecated.
"/org/freedesktop/UDisks2/drives/SAMSUNG_SSD_830_Series_S0XYNEAC664966" :
property "Drive" does not exist
"/org/freedesktop/UDisks2/drives/WDC_WD1002FAEX_00Y9A0_WD_WCAW30075681" :
property "Drive" does not exist
"/org/freedesktop/UDisks2/drives/WDC_WD1002FAEX_00Y9A0_WD_WCAW30058295" :
property "Drive" does not exist
"/org/freedesktop/UDisks2/drives/Generic_Ultra_HS_SD_2fMMC_000000264001" :
property "Drive" does not exist
"/org/freedesktop/UDisks2/drives/Kindle_Internal_Storage_B0241502243506JP" :
property "Drive" does not exist
"/org/freedesktop/UDisks2/drives/ASUS____DRW_24B3LT_B4D0CL324524" : property
"Drive" does not exist
"/org/freedesktop/UDisks2/drives/SAMSUNG_SSD_830_Series_S0XXNEAC626599" :
property "Drive" does not exist
showfoto(25572)/digikam (core) Digikam::ThumbnailCreator::createThumbnail:
Cannot create thumbnail for
"/home/vivo/docs/NIKON/2013/20130420-test/work/EditorWindow-k19287.digikamtempfile.png"
showfoto(25572)/digikam (core) Digikam::ThumbnailCreator::load: Thumbnail is
null for
"/home/vivo/docs/NIKON/2013/20130420-test/work/EditorWindow-k19287.digikamtempfile.png"
showfoto(25572)/digikam (core) Digikam::ThumbnailCreator::createThumbnail:
Cannot create thumbnail for
"/home/vivo/docs/NIKON/2013/20130420-test/work/EditorWindow-Ly7331.digikamtempfile.png"
showfoto(25572)/digikam (core) Digikam::ThumbnailCreator::load: Thumbnail is
null for
"/home/vivo/docs/NIKON/2013/20130420-test/work/EditorWindow-Ly7331.digikamtempfile.png"
showfoto(25572)/digikam (core) Digikam::FileSaveOptionsBox::discoverFormat:
Using fallback format  0
showfoto(25572)/digikam (core) Digikam::FileSaveOptionsBox::discoverFormat:
Using fallback format  0
showfoto(25572)/digikam (core) Digikam::FileSaveOptionsBox::discoverFormat:
Using fallback format  0
libpng error: profile 'icc': 1B0Ah: invalid length
showfoto(25572)/digikam (core) Digikam::EditorCore::slotImageSaved: error
saving image '
/home/vivo/docs/NIKON/2013/20130420-test/work/EditorWindow-w25572.digikamtempfile.png

Note, things have been compiled with gcc-4.8.0 (!).

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[showfoto] [Bug 319267] showfoto (3.0 or 3.1?) fails to save png file with libpng-1.6.x

Andreas K. Huettel
https://bugs.kde.org/show_bug.cgi?id=319267

Andreas K. Huettel <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://bugs.gentoo.org/sho
                   |                            |w_bug.cgi?id=466798

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[showfoto] [Bug 319267] showfoto (3.0 or 3.1?) fails to save png file with libpng-1.6.x

Francesco Riosa-2
In reply to this post by Andreas K. Huettel
https://bugs.kde.org/show_bug.cgi?id=319267

Francesco Riosa <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|[hidden email]       |[hidden email]

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 319267] libkdcraw contains invalid icc profiles, applications fail to save png file with libpng-1.6.x

Andreas K. Huettel
In reply to this post by Andreas K. Huettel
https://bugs.kde.org/show_bug.cgi?id=319267

Andreas K. Huettel <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #3 from Andreas K. Huettel <[hidden email]> ---
From the Gentoo bug report:

--- Comment #8 from John Bowler <jbowler##acm.org> ---
ICC profiles are required to have a length which is a multiple of 4, so the
profile in question is broken.  (See 7.1.2(c) in the spec and "NOTE 1" that
follows it then read 7.2.2 - the length includes the pad bytes.)

I believe there was (and maybe is) an app that was writing text strings at the
end of the profile and, if the text string was not a multiple of 4 in length,
it would produce a bad profile.  Those profiles are easy to fix - just pad the
string with \0 - but other bugs where the profile length is calculated wrong
may result in serious errors.  (libpng does go on to validate the length, but
when the length is detectably broken at the start it simply rejects the
profile.)

This is a benign error on read and the profile will be ignored (along with any
other colorspace information in the PNG) but on write it gets converted into an
application error - we don't want to write PNGs with detectably broken
profiles, something else may crash!

The KDE upstream need to fix the profile, it should be easy.

--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 319267] libkdcraw contains invalid icc profiles, applications fail to save png file with libpng-1.6.x

Francesco Riosa-2
In reply to this post by Andreas K. Huettel
https://bugs.kde.org/show_bug.cgi?id=319267

--- Comment #4 from Francesco Riosa <[hidden email]> ---
krita in calligra also has some

--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 319267] libkdcraw contains invalid icc profiles, applications fail to save png file with libpng-1.6.x

Francesco Riosa-2
In reply to this post by Andreas K. Huettel
https://bugs.kde.org/show_bug.cgi?id=319267

--- Comment #5 from Francesco Riosa <[hidden email]> ---
Created attachment 79736
  --> https://bugs.kde.org/attachment.cgi?id=79736&action=edit
srgb-d65.icm

this profile has been padded with 0 to 6924 bytes (with okteta hex editor) and
the header updated to the new size.

--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 319267] libkdcraw contains invalid icc profiles, applications fail to save png file with libpng-1.6.x

Francesco Riosa-2
In reply to this post by Andreas K. Huettel
https://bugs.kde.org/show_bug.cgi?id=319267

Francesco Riosa <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |CONFIRMED
     Ever confirmed|0                           |1

--- Comment #6 from Francesco Riosa <[hidden email]> ---
every upstream software (libpng and lcms) confirmed that icc profiles are
padded to 4 byte and that the software involved is conformat since a looong
time.

so it's ok to simply replace the original profile with a padded one.

--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 319267] libkdcraw contains invalid icc profiles, applications fail to save png file with libpng-1.6.x

Francesco Riosa-2
In reply to this post by Andreas K. Huettel
https://bugs.kde.org/show_bug.cgi?id=319267

Francesco Riosa <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|CONFIRMED                   |RESOLVED
         Resolution|---                         |FIXED
      Latest Commit|                            |http://commits.kde.org/libk
                   |                            |dcraw/ca2274e40d065e12123f6
                   |                            |d32db3c6fe153e621a2

--- Comment #7 from Francesco Riosa <[hidden email]> ---
Git commit ca2274e40d065e12123f6d32db3c6fe153e621a2 by Francesco Riosa.
Committed on 09/05/2013 at 18:41.
Pushed by riosa into branch 'master'.

ICC profiles should be padded to 4 bytes

In practice with libpng >= 1.6 the profile cannot be embedded if it has
the wrong size thus preventing digikam/showfoto to write png files at
all.

see also

M  +-    --    profiles/srgb-d65.icm

http://commits.kde.org/libkdcraw/ca2274e40d065e12123f6d32db3c6fe153e621a2

--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 319267] libkdcraw contains invalid icc profiles, applications fail to save png file with libpng-1.6.x

Gilles Caulier-4
In reply to this post by Andreas K. Huettel
https://bugs.kde.org/show_bug.cgi?id=319267

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
   Version Fixed In|                            |3.2.0

--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 319267] libkdcraw contains invalid icc profiles, applications fail to save png file with libpng-1.6.x

Francesco Riosa-2
In reply to this post by Andreas K. Huettel
https://bugs.kde.org/show_bug.cgi?id=319267

Francesco Riosa <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|http://commits.kde.org/libk |http://commits.kde.org/libk
                   |dcraw/ca2274e40d065e12123f6 |dcraw/92a57e163222ef9ee0729
                   |d32db3c6fe153e621a2         |64eb5cad92d9567a24d

--- Comment #8 from Francesco Riosa <[hidden email]> ---
Git commit 92a57e163222ef9ee072964eb5cad92d9567a24d by Francesco Riosa.
Committed on 09/05/2013 at 18:41.
Pushed by riosa into branch 'KDE/4.10'.

ICC profiles should be padded to 4 bytes

In practice with libpng >= 1.6 the profile cannot be embedded if it has
the wrong size thus preventing digikam/showfoto to write png files at
all.

see also

M  +-    --    profiles/srgb-d65.icm

http://commits.kde.org/libkdcraw/92a57e163222ef9ee072964eb5cad92d9567a24d

--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 319267] libkdcraw contains invalid icc profiles, applications fail to save png file with libpng-1.6.x

bugzilla_noreply
In reply to this post by Andreas K. Huettel
https://bugs.kde.org/show_bug.cgi?id=319267

[hidden email] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|[hidden email]        |[hidden email]

--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.