Getting list of images

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

Getting list of images

Kevin Dalley
Is there an easy way to get a list of all images using a given tag? My
preference: return ImageInfoList, so that I can pass it to
MetadataSynchronizer.

I suspect that this is easy, but I haven't figured out how to do it.

I'm trying to fix a digikam bug,

https://bugs.kde.org/show_bug.cgi?id=309058


where renaming a tag does not change the image file, or the sidecar
file. Also deleting a tag does not effect the image or sidecar file.

_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: Getting list of images

Gilles Caulier-4
Hi,

Try this code :

QStringList paths = DatabaseAccess().db()->getItemURLsInAlbum(id);

...where "id" is tag album ID. It's return a list of paths of all
items set with tag.

This code is used for ex into fingerprint generator (Maintenance tool) :

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/utilities/maintenance/fingerprintsgenerator.cpp#L116

Best

Gilles Caulier

2013/11/24 Kevin Dalley <[hidden email]>:

> Is there an easy way to get a list of all images using a given tag? My
> preference: return ImageInfoList, so that I can pass it to
> MetadataSynchronizer.
>
> I suspect that this is easy, but I haven't figured out how to do it.
>
> I'm trying to fix a digikam bug,
>
> https://bugs.kde.org/show_bug.cgi?id=309058
>
>
> where renaming a tag does not change the image file, or the sidecar
> file. Also deleting a tag does not effect the image or sidecar file.
>
> _______________________________________________
> Digikam-devel mailing list
> [hidden email]
> https://mail.kde.org/mailman/listinfo/digikam-devel
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel