Bug 502048 - save tiff to tiff make corrupt output file
Summary: save tiff to tiff make corrupt output file
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Showfoto-Save (show other bugs)
Version: 8.6.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-26 21:50 UTC by Kim
Modified: 2025-03-27 11:44 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kim 2025-03-26 21:50:49 UTC
Windows 11, and try on ubuntu to, its the same outcome.

SUMMARY


STEPS TO REPRODUCE
1. scan an image with epson in tiff 16bit 600dpi, app xsane 0.999
2.  open file in showfoto
3.  save file as new file (ctrl+shift+s)
4. now convert to jpg with 

First the one xsane made from the scan, the file raw_scan_001.tiff we open in showfoto and save:

arkiv@Arkiv-PC5:~$ convert "/home/arkiv/Billeder/OCR/raw_scan_001.tiff" -quality 85 "/home/arkiv/Billeder/OCR/raw_scan_001.jpg"
arkiv@Arkiv-PC5:~$ 

All good, now the one from xsane scan saved with ShowFoto, and its the same with the editor in Digcam, both linux on ubuntu and win 11

raw_scan_001_save1.tiff

arkiv@Arkiv-PC5:~$ convert "/home/arkiv/Billeder/OCR/raw_scan_001_save1.tiff" -quality 85 "/home/arkiv/Billeder/OCR/raw_scan_001_save1.jpg"
Afbrudt (SIGABRT) (smed kerne)

OBSERVED RESULT
no output of the jpg file it fails.

i try to clean meta but then got other error, i then try to generate new file, and now i can make jpg but still with error

Here i try to fiddel with it together with chatgpt

i just try this it gives an output jpg but its still gives the error but now i get an jpg file, just not sure if its ok or not, so it looks like its some meta and some other stuff and now this one is left


C5:~$ convert /home/arkiv/Billeder/OCR/raw_scan_001_save1.tiff -depth 16 -compress none /home/arkiv/Billeder/OCR/b0001_clean.tiff
Afbrudt (SIGABRT) (smed kerne)
arkiv@Arkiv-PC5:~$ exiftool -all= -overwrite_original "/home/arkiv/Billeder/OCR/raw_scan_001_save1.tiff"
Warning: [minor] Can't delete IFD0 from TIFF - /home/arkiv/Billeder/OCR/raw_scan_001_save1.tiff
    1 image files updated
arkiv@Arkiv-PC5:~$ convert /home/arkiv/Billeder/OCR/raw_scan_001_save1.tiff -depth 16 -compress none /home/arkiv/Billeder/OCR/b0001_clean.tiff
convert-im6.q16: Unknown field with tag 11 (0xb) encountered. TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/905.


EXPECTED RESULT
an output of my jpg file

SOFTWARE/OS VERSIONS
Windows:  11

ADDITIONAL INFORMATION

i all so found out that in ubuntu its best to start the app with QT_QPA_PLATFORM=xcb showfoto else its really unstable and the editor window is laggy and some time app crash but its better when start with the command abow.
Comment 1 caulier.gilles 2025-03-27 01:41:02 UTC
The crash appears in ImageMagick CLI not Showfoto. We don't expect fix ImageMagick code (:=))).

Is the tiff to jpg convertion work in the Gimp ?
Comment 2 Maik Qualmann 2025-03-27 11:41:12 UTC
Git commit b515c467da820d3ab067806f667ce482a1410b64 by Maik Qualmann.
Committed on 27/03/2025 at 11:40.
Pushed by mqualmann into branch 'master'.

do not write Exif.Photo.PixelX(Y)Dimension to TIFF files.
ExifTool validation reports this as a (minor) warning for TIFF files.
FIXED-IN: 8.7.0

M  +1    -1    NEWS
M  +9    -4    core/libs/dimg/dimg_metadata.cpp
M  +1    -1    core/libs/metadataengine/engine/metaengine.h
M  +9    -5    core/libs/metadataengine/engine/metaengine_item.cpp

https://invent.kde.org/graphics/digikam/-/commit/b515c467da820d3ab067806f667ce482a1410b64
Comment 3 Maik Qualmann 2025-03-27 11:44:59 UTC
I tested it here with a TIFF from XSane via an Epson scanner. Using ImageMagick "convert" never caused a crash. My ImageMagick "convert" version is 7.1.1-44 Q16-HDRI x86_64 22688.

Maik