[Digikam-devel] [Bug 130525] Saving large (>5M) jpg's result in corrupt file

Gilles Caulier caulier.gilles at free.fr
Tue Jul 11 13:01:10 BST 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=130525         




------- Additional Comments From caulier.gilles free fr  2006-07-11 14:01 -------
Andreas,

digiKam work like this :

- In editor, all image data/metadata are stored in memory using a DImg class instance. 

http://websvn.kde.org/trunk/extragear/graphics/digikam/libs/dimg/dimgprivate.h?rev=545648&view=auto

- To save into a new JPEG file, a JEPGLoader::save() is called :

http://websvn.kde.org/trunk/extragear/graphics/digikam/libs/dimg/loaders/jpegloader.cpp?rev=557529&view=auto

JPEG image loader is derivated from generic DimgLoader loader class (a friend of DImg) :

http://websvn.kde.org/trunk/extragear/graphics/digikam/libs/dimg/dimgloader.cpp?rev=557998&view=auto

- The JPEG Loader is simple and do not store the metadata in the new file. It create the the new and store the image data and the icc profile. The file is closed and the DImgLoader::saveMetadata() method is called to store Exif and IPTC (look at end of JPEGLoader::save() method.

- In fact the metadata are stored using Exiv2, by the famous DMetadata class (:=))). Do you remember ?

http://websvn.kde.org/trunk/extragear/graphics/digikam/libs/dmetadata/dmetadata.cpp?rev=556687&view=auto

I suspect a problem in DImgLoader::saveMetadata() calling DMetadata methods. Your viewpoint ?

Gilles



More information about the Digikam-devel mailing list