Bug 212072 - TIFFs generated with digiKam are broken/corrupted
Summary: TIFFs generated with digiKam are broken/corrupted
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-DImg-TIFF (show other bugs)
Version: 1.0.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-27 17:10 UTC by Kamil Stepinski
Modified: 2019-07-27 19:55 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kamil Stepinski 2009-10-27 17:10:10 UTC
Version:           1.0.0-beta5 (using KDE 4.3.2)
OS:                Linux
Installed from:    Ubuntu Packages

The bug is easy to reproduce (at least on my system).

1. I open a JPG photo in digiKam. Some usual stuff then -> levels, curves, colours, sharpening. I want to work on the photo further in GIMP so I click on "Save As" in digiKam and save the photo as a TIF file ("Compress TIFF files" option is ticked).

2. I try to open the TIF in GIMP but it seems the file is corrupted. It shows the file as having two pages.
Screenshot:
http://farm3.static.flickr.com/2752/4050395742_d0fcdbe724_o.png

3. The best results I was able to get are heavily distorted. Looks like somebody played with Solarise and Emboss filters. The photo looks the same when trying to open it with Gwenview.
Screenshot:
http://farm4.static.flickr.com/3580/4049650515_c3d133dfde_o.jpg

4. Finally after trying to open the file in GIMP several times the X (or Kwin) gave up the ghost and I was brought back to the login screen which really sucked as I had a number of apps open before. ;)
Comment 1 caulier.gilles 2009-10-27 18:20:13 UTC
Kamil,

I think it's fully relevant of Exiv2 library.

This file is a duplicate of #211758

*** This bug has been marked as a duplicate of bug 211758 ***
Comment 2 Andreas Huggel 2009-10-27 19:59:16 UTC
How can I reproduce this with Exiv2 alone?

Andreas
Comment 3 caulier.gilles 2009-10-27 20:06:37 UTC
Andreas,

The first stage done by digiKam core is to write a tiff file using libtiff... until this step, i think tiff file is not corrupted. It's easy to reproduce a file like this using ImageMagick, when you convert a JPEG to TIFF with convert command line tool

The second stage call Exiv2 with libkexiv2 to update all digiKam metadata in file. It's the more complicated stuff, because IPTC, and XMP are created, and some exif tags updated (as image dim, orientation, comment, etc...)

Comparing satge 1 and stage 2 images with exiftool can be very instructive. We can generate stage 1 file easily. There is only just one line to comment in source code.

Gilles
Comment 4 Andreas Huggel 2009-10-28 13:27:47 UTC
Gilles,

Can you follow the steps provided in this bugreport and create the stage 1 and stage 2 files? It sounds like it doesn't matter what file, so a small JPG should be enough and with as little metadata as possible (none?). E.g., try with exiv2/test/data/exiv2-empty.jpg

Then please attach all three files here and I'll analyse them in detail.

Andreas
Comment 5 caulier.gilles 2009-12-06 15:45:43 UTC
*** Bug 217593 has been marked as a duplicate of this bug. ***
Comment 6 caulier.gilles 2009-12-06 16:00:38 UTC
Andreas, i merged this file with #217593. Please switch to this entry...

Gilles
Comment 7 Marcel Wiesweg 2009-12-06 17:23:33 UTC
Bugs 217593, 212072, 211066 and 211758 are now all merged to bug #211758
Comment 8 caulier.gilles 2019-07-27 19:55:07 UTC
Fixed with bug #211758