KDE/kdegraphics/libs/libkexiv2/libkexiv2

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

KDE/kdegraphics/libs/libkexiv2/libkexiv2

Gilles Caulier-4
SVN commit 824710 by cgilles:

libkexiv2 from trunk : add special case to handle TIFF writting mode properly. we need to load taget TIFF image metadata before to update it, else the image will be broken. look my comments on source code for details.
Hurra : this is want mean than TIFF metadata can be updated on the fly, like JPEG, without to touch image data.
CCMAIL: [hidden email]


 M  +7 -0      kexiv2.cpp  


--- trunk/KDE/kdegraphics/libs/libkexiv2/libkexiv2/kexiv2.cpp #824709:824710
@@ -221,6 +221,13 @@
         Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open((const char*)
                                       (QFile::encodeName(filePath)));
 
+        // Special case with TIFF format: like all tiff file structure is based on Exif, we
+        // need to read all metadata from original file before to update all. Exiv2 will merge
+        // old and new data.
+        QString ext = finfo.suffix().toUpper();
+        if (ext == QString("TIF") || ext == QString("TIFF") || ext == QString("DNG"))
+            image->readMetadata();
+
         // Image Comments ---------------------------------
 
         mode = image->checkMode(Exiv2::mdComment);
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: KDE/kdegraphics/libs/libkexiv2/libkexiv2

Bugzilla from mikmach@wp.pl
Dnia Friday 27 of June 2008, Gilles Caulier napisaƂ:
> SVN commit 824710 by cgilles:
>
> libkexiv2 from trunk : add special case to handle TIFF writting mode
> properly. we need to load taget TIFF image metadata before to update it,
> else the image will be broken. look my comments on source code for
> details. Hurra : this is want mean than TIFF metadata can be updated on
> the fly, like JPEG, without to touch image data. CCMAIL:
> [hidden email]

I am afraid still no bananas :(

Works for Captions (as Exif, IPTC, XMP) but tried to modify few other
fields of Exif (Name, Copyright, Artist) and image is broken.

m.

_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel