[Digikam-users] Can digiKam read jpeg's IPTC.Urgency tag set outside?

Gilles Caulier caulier.gilles at gmail.com
Thu Oct 18 14:39:40 BST 2007


2007/10/18, BillChan <billypchan at gmail.com>:
>
> Hello,
> I am a new Ubuntu user and found DigiKam is a great photo tool. I have
> thousands of photo shot with my Nikon D80, managed with Picasa for
> windows previously. Now I move them to my Ubuntu PC and wrote a Perl
> script to 'copy' the Picasa's star to DigiKam...
>
> I use Perl's exiftool module to do it, but something strange happened...
> This is part of my script:
>
> my $exifTool = new Image::ExifTool;
> $tag = '1IPTC:Urgency';
>
> foreach $file (@arFiles)
> {
> $info = $exifTool->ImageInfo($file,$tag2);$success =
> $exifTool->SetNewValue($tag, '7'); #set rating to 1 star
> $exifTool->WriteInfo($file);
> }
>
> then select the photos in DigiKam, and click 'more->read metadata from
> file to database' on right panel and hope it work...
>
> The problem is, when $file is a .NEF file(Nikon raw) it works great. But
>    if is a .jpg file(major of my collections), The star doesn't appear
> in DigiKam.


There is no reason for that. all image file format are parsed by the same
way. Are you sure than your JPEG file as Iptc.Urgency tag set properlly
before to import it to digiKam DB ?

Alternativly, there are other way than IPTC to set Rating value. Try
Exif.Image.0x4746 tag (Windows Vista Rating).

Note : the code used to extract rating from image can be seen here :

http://websvn.kde.org/branches/extragear/kde3/graphics/digikam/libs/dmetadata/dmetadata.cpp?revision=711981&view=markup

...and expecially the method DMetadata::getImageRating().

Regards

Gilles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-users/attachments/20071018/19f08449/attachment.html>


More information about the Digikam-users mailing list