[Digikam-devel] Image Metadata extraction : implementation progress...

Gilles Caulier caulier.gilles at kdemail.net
Tue Feb 28 13:48:55 GMT 2006


Le Mardi 28 Février 2006 14:23, F.J.Cruz a écrit :
> El Martes, 28 de Febrero de 2006 14:08, Gilles Caulier escribió:
> > Le Mardi 28 Février 2006 12:22, F.J.Cruz a écrit :
> > > El Martes, 28 de Febrero de 2006 11:09, Gilles Caulier escribió:
> > > > Hi all digiKam users/team,
> > > >
> > > > Like you have seen last week, I have started a new implementation of
> > > > metadata viewer using libExiv2 instead the current Exif viewer using
> > > > libkexif.
> > > >
> > > > A fresh screenshot can be seen here :
> > > >
> > > > http://digikam3rdparty.free.fr/Screenshots/digikam0.9.0-alpha6.png
> > > >
> > > > After any days of indeep testing, the implementation is more mature.
> > > > Like you can see in this screenshot, we have :
> > > >
> > > > - A standard Exif metatada viewer.
> > > > - An Exif  Maker Notes viewer
> > > > - An IPTC metadata viewer.
> > > > - Support of CRW metadata (thanks exiv2)
> > > > - Support of Raw profiles embedded (Exif/IPTC) in PNG files built by
> > > > ImageMagick during JPEG -> PNG conversion.
> > > > - Each sidebar tab can be filtered to "Simple" (user friendly: the
> > > > more important for photograph) and to "Full" (all metadata).
> > > > - All metadata groups are more visible than old Exif viewer.
> > > >
> > > > The implementation is based on 2 parts :
> > > >
> > > > -> One metadata extractor witch detect the file type and use a
> > > > dedicaced loader to construct Exiv2 metadata container. Actually
> > > > JPEG, PNG and CRW files are supported. I have planed to do TIFF/DNG
> > > > files and any others RAW files like NEF (Paco if you is interresed
> > > > (:=)))) and MRW. The implementation is similar to Digikam::DImg
> > > > container (about loader)...
> > >
> > > Of course,I'm very interested on metadata support in digiKam,
> > > especially NEF files since I'm owner of a D50.In fact, along this last
> > > week I've been having a look to exiv2 code and I want to make you some
> > > questions:
> > >
> > > - How are you going to implement metadata infor for files that are not
> > > implemented in exiv2 yet?
> >
> > The better way that i have identifed to add better RAW file support is to
> > re-use implementation from ExifProbe project :
> >
> > http://www.virtual-cafe.com/~dhh/tools.d/exifprobe.d/exifprobe.html
> >
> > I think that only a simple exif/markernote extraction is enought in
> > digiKam at this moment.
> >
> > > Actually exiv2 has support only for CRW files
> > > (one of the two Canon RAW formats, the other one is CR2), altough there
> > > are files with makernotes specifications for a lot of manufacturers, so
> > > if I want to implement metadata extraction for NEF files, have I to
> > > implement the equivalent to crwimage in Exiv2? this can be a hard work
> > > if we have to do this for all the manufacturers who provide RAW format.
> >
> > The ExifProbe have a very well documentated source code about. Each file
> > format is separated cleanly. I think we can trying to use it.
> >
> > Each Digikam::DMetadata::loader are separate too. We can add new image
> > file format loader progressivly without any risk.
> >
> > > - What's about "write-access" on iptc data?
> >
> > With Exiv2 you can write IPTC tag in image, CRW included.
> >
> > > - Which of all  these changes are for 0.9.0?
> >
> > Right question. I need any report about my patch with the current
> > implementation before to commit anything.
>
> Sorry, I can't (or don't know how to) apply your pathc, it give me some
> errors:
>
> patching file libs/imageproperties/imagepropertiessidebar.cpp
> Hunk #1 FAILED at 1.
> Hunk #2 FAILED at 48.
> Hunk #3 FAILED at 74.
> Hunk #4 FAILED at 86.
> Hunk #5 FAILED at 109.
> 5 out of 5 hunks FAILED -- saving rejects to file
> libs/imageproperties/imagepropertiessidebar.cpp.rej
> patching file libs/widgets/metadata/makernotewidget.h
> patching file libs/widgets/metadata/exifwidget.cpp
> patching file libs/widgets/metadata/iptcwidget.cpp
> patching file libs/widgets/metadata/exifwidget.h
> patching file libs/widgets/metadata/metadatalistview.cpp
> patching file libs/widgets/metadata/iptcwidget.h
> patching file libs/widgets/metadata/metadatalistview.h
> patching file libs/widgets/metadata/mdkeylistviewitem.cpp
> patching file libs/widgets/metadata/mdkeylistviewitem.h
> patching file libs/widgets/metadata/metadatawidget.cpp
> patching file libs/widgets/metadata/metadatalistviewitem.cpp
> patching file libs/widgets/metadata/Makefile.am
> patching file libs/widgets/metadata/makernotewidget.cpp
> patching file libs/widgets/metadata/metadatawidget.h
> patching file libs/widgets/metadata/metadatalistviewitem.h
> patching file libs/widgets/Makefile.am
> Reversed (or previously applied) patch detected!  Assume -R? [n]
> Apply anyway? [n]
> Skipping patch.
> 2 out of 2 hunks ignored -- saving rejects to file
> libs/widgets/Makefile.am.rej
> patching file libs/Makefile.am
> patch unexpectedly ends in middle of line
> patch: **** malformed patch at line 4316:
>
> This output happens for other files to patch too.
>

diff file updated. Can be applied to a fresh svn checkout like this :

[gilles at lserv3 digikam]$ patch -p0 < metadata.diff
patching file libs/dimg/dimg.cpp
patching file libs/dimg/dimg.h
patching file libs/dimg/dimgloader.cpp
patching file libs/dimg/loaders/pngloader.cpp
patching file libs/dimg/loaders/jpegloader.cpp
patching file libs/dimg/loaders/rawloader.cpp
patching file libs/dimg/Makefile.am
patching file libs/dimg/dimgloader.h
patching file libs/dmetadata/dmetadata.cpp
patching file libs/dmetadata/loaders/dmetaloader.cpp
patching file libs/dmetadata/loaders/pngmetaloader.cpp
patching file libs/dmetadata/loaders/jpegmetaloader.cpp
patching file libs/dmetadata/loaders/dmetaloader.h
patching file libs/dmetadata/loaders/tiffmetaloader.cpp
patching file libs/dmetadata/loaders/pngmetaloader.h
patching file libs/dmetadata/loaders/rawmetaloader.cpp
patching file libs/dmetadata/loaders/jpegmetaloader.h
patching file libs/dmetadata/loaders/Makefile.am
patching file libs/dmetadata/loaders/tiffmetaloader.h
patching file libs/dmetadata/loaders/rawmetaloader.h
patching file libs/dmetadata/Makefile.am
patching file libs/dmetadata/dmetadata.h
patching file libs/imageproperties/imagepropertiessidebar.h
patching file libs/imageproperties/imagepropertiessidebardb.cpp
patching file libs/imageproperties/imagepropertiesexiftab.cpp
patching file libs/imageproperties/imagepropertiesexiftab.h
patching file libs/imageproperties/imagepropertiessidebarcamgui.cpp
patching file libs/imageproperties/imagepropertiessidebarcamgui.h
patching file libs/imageproperties/Makefile.am
patching file libs/imageproperties/imagepropertiessidebar.cpp
patching file libs/widgets/metadata/makernotewidget.h
patching file libs/widgets/metadata/exifwidget.cpp
patching file libs/widgets/metadata/iptcwidget.cpp
patching file libs/widgets/metadata/exifwidget.h
patching file libs/widgets/metadata/metadatalistview.cpp
patching file libs/widgets/metadata/iptcwidget.h
patching file libs/widgets/metadata/metadatalistview.h
patching file libs/widgets/metadata/mdkeylistviewitem.cpp
patching file libs/widgets/metadata/mdkeylistviewitem.h
patching file libs/widgets/metadata/metadatawidget.cpp
patching file libs/widgets/metadata/metadatalistviewitem.cpp
patching file libs/widgets/metadata/Makefile.am
patching file libs/widgets/metadata/makernotewidget.cpp
patching file libs/widgets/metadata/metadatawidget.h
patching file libs/widgets/metadata/metadatalistviewitem.h
patching file libs/widgets/Makefile.am
patching file libs/Makefile.am
[gilles at lserv3 digikam]$    

The new diff file is here :

http://digikam3rdparty.free.fr/misc.tarballs/metadata.diff

Gilles



More information about the Digikam-devel mailing list