Created attachment 114172 [details] zip file containing original image, image after editing and saving, and config I use a Pentax K3 and occasionally my wife's Canon point and shoot. When the Pentax images are edited and saved all exif information is lost. With the Canon it is fine. I've been able to read and write exif info using exiv2 on the same files so I am filing the bug in digikam. Steps to reproduce: 1. open image in attached zip file (IMG_1587.JPG) 2. Edit and save. To produce the edited file I did Brightness/Contrast/Gamma 5/15/1.0 Actual Result: Photograph Properties is missing in the Properties tab exiv2 shows no exif data: "File name : IMG_1587_v1.JPG File size : 643327 Bytes MIME type : image/jpeg Image size : 1920 x 1280 IMG_1587_v1.JPG: No Exif data found in the file" Expected Result: All information from original file unless changed by edit is still in file and is shown under Photograph Properties in Properties tab. I am using the 5.9.0 appimage so I am only including minimal system information. I can provider more if needed. The attachment includes my config file. System Info: OS: Ubuntu 18.04 Linux Kernel: 4.15.0-29-generic
Looks like an Exiv2 problem: digikam.metaengine: Exiv2 ( 2 ) : Exif tag Exif.PentaxDng.0x0406 not encoded digikam.metaengine: Exiv2 ( 2 ) : Exif tag Exif.PentaxDng.0x0406 not encoded digikam.metaengine: Cannot save metadata using Exiv2 (Error # 37 : Size of Exif JPEG segment is larger than 65535 bytes Maik
I have now downloaded a good dozen sample images of the Pentax K-3 from web, with no image is the problem to reproduce. The images also have different firmware versions. Is your test image directly from the camera? DigiKam-5.9.0 has registered as software, so I suspect that you have downloaded the images with the import tool? Or have JPEG files been converted from a DNG? Maik
The files in the attached zip file were shot as jpegs and imported in digikam from the sd card. The edited one was then edited in digikam and saved. If this should be filed as an exiv2 bug I can do that, any info on how digikam is calling exiv2 might be useful.
Hi, The trace in comment #1 is not a bug really. it's a guard from exiv2 to prevent to corrupt a jpeg file when you backport metadata from non standard jpeg standard. Typically, a jpeg segment cannot store more than 64Kb. A JPEG segment is used to store the whole Exif byte array to the image. Exif.PentaxDng.0x0406 tags is not a standard Exif tag. It's a makernote which is a bulk of data not documented stored by Pentax for DNG processing. Adobe as extended the standard Exif to be able to use more than one JPEG segment concatened, but i'm not sure that Exiv2 support this mode. So, when DK process this kind of JPEG Pentax file, a new JPEG temporary file is created at save process, it ask to Exiv2 in backport original JPEG Exif to new file and call "Houston control room" The solution is to append Exif.PentaxDng.0x0406 to the backlist tags list that DK include before to process with Exiv2. Gilles Caulier
I cannot find the blacklist of tags in DK source code for JPEG files. Only TIFF tags are blacklisted at save time: https://cgit.kde.org/digikam.git/tree/core/libs/dmetadata/metaengine_p.cpp#n230 So the blacklist for JPEG must be in Exiv2 source code. Gilles Caulier
As this error is generated by Exiv2, the best way is to test with CLI tool when you backport original Exiv2 to a JPEG file without Exif data. The error must be reported in the console. After that, you can report this problem to Exiv2 team with your test images.
After 3 weeks of work, i finally completed the compilation of AppImage using Qt 5.11.3 + QWebkit 5.212. New 6.1.0 pre-release AppImage bundle can be found here (64 bits only for the moment) : https://files.kde.org/digikam/ Please check if this bugzilla entry still valid. Thanks in advance Gilles Caulier
This was resolved in 6.0.0 when when exiv2 was upgraded to 0.27 (https://github.com/Exiv2/exiv2/issues/401)