Created attachment 60750 [details] exiv2 -pa output for the test (rotated) file Version: 2.0.0 (using KDE 4.6.2) OS: Linux Rotating a TIFF file with metadata in digikam wipes out most of its metadata. The attachments text files show the output of "exiv2 -pa" on two identical files, before ("reference") and after ("test") the rotation. The reference and test files are also available: http://dl.dropbox.com/u/17707983/rotate-reference.tif http://dl.dropbox.com/u/17707983/rotate-test.tif This issue is particularly problematic, because it causes data loss; relevant metadata like speed, aperture, etc. of a photograph are lost forever. (One could attempt to restore some of the metadata using the values saved in the database, unfortunately metadata can't be written to TIFF files; see bug 271757) Reproducible: Always Steps to Reproduce: * Open a TIFF file with metadata (e.g. the attached reference photograph) * look at the metadata, e.g. using exiv2 -pa <filename.tif> * rotate the picture in digikam * look at the metadata again
Created attachment 60751 [details] exiv2 -pa output for the reference (prior to rotation) file
How do you perform rotation ? in editor, or using album icon view (through kipi-plugins) Gilles Caulier
If you use editor, rotation is performed on touch only image data. Metadata are transfered to target image using Exiv2. Andreas, It can be an libexiv2 issue ? Gilles Caulier
The problem appears (at least) when rotating using the icon in the album view.
From iconview, kipi-plugins is used, and workflow is different. Image is rotated using libtiff, and after metadata after updated using Exiv2. Note : can ypu confirm that rotating through Image editor or Batch Queue Manager in digiKam do not lost metadata ? Gilles Caulier
(In reply to comment #5) > From iconview, kipi-plugins is used, and workflow is different. > > Image is rotated using libtiff, and after metadata after updated using Exiv2. Then maybe this is caused by bug 271757. > Note : can you confirm that rotating through Image editor or Batch Queue > Manager in digiKam do not lost metadata ? As far as my testing can tell: * Rotating through the image editor seems to preserve the metadata; * Unless I'm doing something wrong, rotating through the batch queue manager doesn't seem to rotate at all (!).
Created attachment 60772 [details] Batch Queue Manager Rotate tool in action
We need feedback using a recent version. 2.0.0 RC is out, please test... Thanks in advance Gilles Caulier
I can confirm this as a kipi-plugins problem. Took a random metadata, used icons to rotate, metadata is gone. Command line output: digikam(5413)/KIPI (general) KIPIJPEGLossLessPlugin::ImageRotate::rotateImageMagick: ImageMagick Command line: ("convert", "-rotate", "90", "/media/fotos/Digikam Sample/TIFF/01-TIF - 8bits - RGB- NONE_1.tiff[0]", "/tmp/kde-marcel/digikamTJ5413kipiplugin-rotate.tiff") convert: /media/fotos/Digikam Sample/TIFF/01-TIF - 8bits - RGB- NONE_1.tiff: invalid TIFF directory; tags are not sorted in ascending order. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/704. convert: /media/fotos/Digikam Sample/TIFF/01-TIF - 8bits - RGB- NONE_1.tiff: unknown field with tag 11 (0xb) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/704. convert: /media/fotos/Digikam Sample/TIFF/01-TIF - 8bits - RGB- NONE_1.tiff: unknown field with tag 18246 (0x4746) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/704. convert: /media/fotos/Digikam Sample/TIFF/01-TIF - 8bits - RGB- NONE_1.tiff: unknown field with tag 18249 (0x4749) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/704. digikam(5413)/KEXIV2 KExiv2Iface::KExiv2::setImageOrientation: Exif.Image.Orientation tag set to: 1 digikam(5413)/KEXIV2 KExiv2Iface::KExiv2::setImagePreview: JPEG image preview size: ( 682 x 1024 ) pixels - 83729 bytes digikam(5413)/KIPI (general) KIPIJPEGLossLessPlugin::Utils::updateMetadataImageMagick: ImageMagick Command line: ("mogrify", "-profile", "/tmp/kde-marcel/digikamhX5413kipipluginsexif.app1", "-profile", "/tmp/kde-marcel/digikamSL5413kipipluginsiptc.8bim", "-profile", "/tmp/kde- marcel/digikamnn5413kipipluginsxmp.xmp", "/tmp/kde-marcel/digikamTJ5413kipiplugin-rotate.tiff[0]") Looks as if we used temp files with stored metadata and then mogrify -profile to rewrite the metadata?
Guillaume, This file still valid using kipi-plugins 2.4 ? Gilles Caulier
Guillaume, With next digiKam 2.6.0 (current implementation from Git/Master), we don't use JPEGLossLess kipi plugin to rotate or flip image. A dedicated implementation is used from digiKam core to process transformation. Can you reproduce the problem ? Gilles Caulier
I confirm that afaict the problem has disappeared with the current implementation in git/master. Rotating using the album icons now preserves the metadata in TIFF files.