Bug 153207 - flickr export without using application tags: Flickr still reads embedded metadata into tags
Summary: flickr export without using application tags: Flickr still reads embedded met...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-WebService-Flickr (show other bugs)
Version: 5.6.0
Platform: Debian testing Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-01 05:11 UTC by x3ri7yz02
Modified: 2018-03-23 12:07 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 0.1.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description x3ri7yz02 2007-12-01 05:11:17 UTC
Version:            (using KDE KDE 3.5.8)
Installed from:    Debian testing/unstable Packages
OS:                Linux

When exporting images to Flickr, the export plugin can optionally use the application tags.  If this option is NOT selected it seems that the user's intent is to manually enter tags in the space provided, or to upload the image without tags.

In this case, if the tags have been stored in image metadata by Digikam, Flickr reads this information and so the application tags appear on Flickr anyway.  Given the user's presumed intent (as above), I think the export plugin should provide the option to strip out that metadata from the image being uploaded. 

(While this behaviour is presumably the result of Flickr tagging API instead of kipi-plugins, I think kipi-plugins could provide a solution.  So this is a wish, not a bug.)

To Reproduce:
- In Digikam, under Settings -> Metadata, in the "IPTC Actions" pane, set "Save image tags as 'Keywords' tag" to ON.
- tag an image with any keyward (eg "test")
- Use Flickr export.  De-select option to "Use application tags".

Desired result:  
- image is uploaded without any tags

Observed result: 
- image is uploaded with "test" tag preserved
Comment 1 Lionel Besson 2008-05-22 09:11:58 UTC
This is I think because Flickr extracts metadata from the 'comment' and 'keywords' fields of EXIF/IPTC data of the images. (At least, it extracts it for an image sent via the web interface)

One solution might be to detect when the tags / comments are present in the application database AND in the image and to produce a temporary image with such fields removed (in a similar way to what is done when the image is resized before upload)


Lionel
Comment 2 caulier.gilles 2008-05-22 22:15:57 UTC
SVN commit 811370 by cgilles:

remove IPTC keywords from file to upload to prevent dupplicate Tags entries in Flickr web interface
BUGS: 153207


 M  +7 -2      flickrtalker.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=811370
Comment 3 Lionel Besson 2008-05-25 15:17:01 UTC
Hi,

I'm not sure to quite understand how the commit solves the bug.

1) your comment talks about duplicate tags
2) the coment in the commit talks about unsupported UTF-8 in IPTC taht would create trouble if imported into Flickr

As far as I can test:
1) Use FlickrExport to Upload a photo with a keyword IPTC meta-data (say 'test'), and asking Digikam not to export the tags, then your photo is tagged by Flickr with test (so most probably read from IPTC field)
2) Use FlickrExport to upload the same photo, but with applictation tags. You don't get any duplicated tags (tagged only with 'test'
3) Use the Flickr 'basic uploader' web interface to upload a photo with IPTC keywords with non-ASCII characters. The file is uploaded correctly, and the characters are interpreted correctly.
4) Use the 'normal uploader' from Flickr for the same photo. It will fail
5) Use digikam to export the photo (with or without using application tags): it will fail (bad signature)

I guess you choosed to remove IPTC keywords tags each time since:
- if 'use host application tags' is selected, then it is useless extra information
- if disabled, then we don't want it to be uploaded
- if sent and with non-ASCII chars, it will fail anyway

Hope, this will help


Lionel
Comment 4 x3ri7yz02 2008-05-25 16:33:26 UTC
Hi Lionel,  

I think perhaps Gilles has referenced the wrong bug in the code snippet you refer to (inside FlickrTalker::addPhoto).  Instead of this bug (#153207) I think the UTF-8 related comment was meant to apply to #155270 ( http://bugs.kde.org/show_bug.cgi?id=155270 )  Gilles has been busy fixing Flickr export bugs recently!  Hopefully this answers your question.

As an aside, I think the logic you have above is correct: regardless of the user's intentions, it works better if the tags are stripped out of IPTC.  Although I didn't mention it in the first report, if Flickr reads the tags from IPTC, they are also rendered like this:
Places/London/London Bridge

rather than what the user probably wants:
Places
London
London Bridge

So stripping the IPTC tags out and (optionally) having Digikam send them makes sense and is an elegant solution.   

Testing with the latest SVN version:  Unfortunately, the problem is only half fixed: it works perfectly as long as there is only ONE IPTC tag.  If there are multiple IPTC tags, only the first is removed.  The remainder are preserved, and then read into Flickr.

It appears the code only removes one (the first) IPTC tag.  It should remove ALL IPTC tags in the image.

To reproduce:  upload any image with multiple IPTC tags.  If "Use Application tags" is de-selected, no tags should be sent.  But all tags except the first one still show up on Flickr.

Gilles - I will re-open this bug for now if that's OK with you?  If you would prefer me to open a new bug, let me know.

Comment 5 caulier.gilles 2008-05-25 16:36:12 UTC
It's fine for me. i will look in code

Gilles
Comment 6 Lionel Besson 2008-05-25 16:49:34 UTC
Ok, I see

One last thing: I think you should also strip IPTC caption tag (Flickr seems to use the caption field for description, as well as keywords fields for tags), since when using non-ASCII chars, it also seems to fail.

Anyway, it would be a pity to loose this information if entered by the user, I don't know if the Flickr API allows to specify a description the same way you specify tags?

Then we could have something like 'Use host application tags and comments'

Thanks for all the good work anyway

Lionel
Comment 7 x3ri7yz02 2008-05-26 00:32:38 UTC
Hi Lionel,

>I think you should also strip IPTC caption tag (Flickr seems to use 
>the caption field for description, as well as keywords fields for tags), 
>since when using non-ASCII chars, it also seems to fail. 

For me (with SVN version) images with non-ASCII chars in IPTC caption are correctly uploaded.  Filenames with non-ASCII (which are used for Flickr titles) are also preserved correctly.  

What version are you using? Can you confirm my testing?

cheers,
tauri
Comment 8 caulier.gilles 2008-05-26 08:11:48 UTC
SVN commit 812694 by cgilles:

likexiv2 from KDE3 branch : backport code from KDE4 : removeIptcTags will handle all redondant IPTC tags at the same time, not only the first one from tags list.
BUGS: 153207


 M  +2 -1      NEWS  
 M  +284 -279  libkexiv2/kexiv2.cpp  
 M  +9 -9      libkexiv2/kexiv2.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=812694
Comment 9 caulier.gilles 2008-05-26 08:20:16 UTC
tauri,

I find the bug. It's relevant of libkexiv2::removeIptcTag() whitch only play with the first entry of redondant iptc tags.

Now there is a loop to handle all iptc tags which have the same name.

IMPORTANT : i suspect than other bugs in B.K.O are now fixed, especially in digikam/metadata bugzilla component.

Please, can you check these entries :

http://bugs.kde.org/show_bug.cgi?id=152199
http://bugs.kde.org/show_bug.cgi?id=159158

... and perhaps some others.

Gilles Caulier
Comment 10 Lionel Besson 2008-05-26 09:00:48 UTC
tauri,

Unfortunately I had no time to recompile Digikam from svn recently (I partly reinstalled my computer) so the Digikam version I use is the latest available for Ubuntu (I think it is 0.9.3 but my home computer is down at the moment).

I will recompile a svn version of Digikam some time but this is unlikely to happen in the coming week.

I think that if you can successfully upload an image with non-ASCII chars in IPTC caption, then the bug is solved in svn version. Should I still have such problems when I update my version of Digikam, I'll let you know

regards,

Lionel
Comment 11 x3ri7yz02 2008-05-27 03:24:08 UTC
Tested latest SVN version - multiple IPTC tags are all stripped.  Works well.

Will go test the others now.

thanks!