Bug 467713

Summary: Rating unintentionally set to max. after cropping an image
Product: [Applications] digikam Reporter: Daimonicon <daimonicon>
Component: Plugin-Bqm-CropAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, metzpinguin
Priority: NOR    
Version First Reported In: 7.10.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In: 8.2.0
Sentry Crash Report:
Attachments: attachment-1323211-0.html
attachment-1324103-0.html

Description Daimonicon 2023-03-23 10:57:30 UTC
SUMMARY
***
When you crop an image with the image editor, the rating is automatically set to max. This doesn't bother me personally, but I don't think it should be like this?
***

STEPS TO REPRODUCE
1. see video https://www.youtube.com/watch?v=MswL6NkhVnY
Comment 1 Maik Qualmann 2023-03-23 11:32:45 UTC
I can't reproduce that here. We copy the metadata to the new image. Either the correct rating was not imported into the DB beforehand or there was another problem. Are sidecars involved?

Maik
Comment 2 Daimonicon 2023-03-23 11:53:09 UTC
(In reply to Maik Qualmann from comment #1)
> I can't reproduce that here. We copy the metadata to the new image. Either
> the correct rating was not imported into the DB beforehand or there was
> another problem. Are sidecars involved?
> 
> Maik

I assign the keywords first and then usually crop the image. I don't give a rating myself because I don't need it. What would be "sidecars" ? If you mean software that accesses the images at the same time, then I can rule that out. If my settings are correct, it only writes the metadata to an xmp file and not to the image itself. digiKam repeats what is shown in the video every time with the rating.
Comment 3 Maik Qualmann 2023-03-23 12:09:03 UTC
Well sidecars are "XMP" files, so yes. It is possible that the rating is in the metadata of the images themselves. Use the metadata viewer to check whether rating metadata is available. Otherwise send me an image + XMP file, before you crop the image, to my private mail.
The behavior can therefore be "normal" depending on the status of your metadata in the images.

Maik
Comment 4 caulier.gilles 2023-05-03 12:21:04 UTC
@Daimonicon 

Did you sent the image + XMP sidecar by private mail to Maik ?

Also, digiKam 8.0.0 is out. This entry still valid with this release ?

Best regards

Gilles Caulier
Comment 5 Maik Qualmann 2023-05-03 17:22:14 UTC
Yes, I received a sample. Maybe it got lost somehow then. I tested it again. The sidecar contains the entry "photoshop:Urgency="1" which is interpreted by the Exiv2 conversion table for XMP metadata as "Iptc.Application2.Urgency". The value 1 here means 5 stars. If a crop action carried out in the Image Editor, we copy the metadata and the 5 stars will appear.

So the problem is, we ask for "Iptc.Application2.Urgency" in the rating search and get the entry for "photoshop:Urgency" from Exiv2, which is actually a color label tag.

At the moment I don't have a right solution for this.

Maik
Comment 6 Daimonicon 2023-05-03 18:21:31 UTC
Created attachment 158661 [details]
attachment-1323211-0.html

I mean already that I had sent both files. However, the images do not cause
any more problems - reducing the size of the images with an external
program was apparently the beginning of the error and I have completely
omitted this. Also the other errors did not occur more after that.

I also stopped using sidecars so that the data is written directly to the
image or DB.

Maik told me it can't be because of the external image resizer - but since
I left out this step no more problems even with v7.10.0. I installed the
update to 8.0.

Am Mi., 3. Mai 2023 um 14:21 Uhr schrieb <bugzilla_noreply@kde.org>:

> https://bugs.kde.org/show_bug.cgi?id=467713
>
> caulier.gilles@gmail.com changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>                  CC|                            |caulier.gilles@gmail.com
>
> --- Comment #4 from caulier.gilles@gmail.com ---
> @Daimonicon
>
> Did you sent the image + XMP sidecar by private mail to Maik ?
>
> Also, digiKam 8.0.0 is out. This entry still valid with this release ?
>
> Best regards
>
> Gilles Caulier
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 7 Daimonicon 2023-05-03 18:36:14 UTC
Created attachment 158664 [details]
attachment-1324103-0.html

So there was a Photoshop entry there that took care of the stars and color
markings ? So I use Photoshop but not in connection with these pictures. In
the meantime I have also left out the sidecars. Up to this point the
program runs great.

Am Mi., 3. Mai 2023 um 19:22 Uhr schrieb Maik Qualmann <
bugzilla_noreply@kde.org>:

> https://bugs.kde.org/show_bug.cgi?id=467713
>
> --- Comment #5 from Maik Qualmann <metzpinguin@gmail.com> ---
> Yes, I received a sample. Maybe it got lost somehow then. I tested it
> again.
> The sidecar contains the entry "photoshop:Urgency="1" which is interpreted
> by
> the Exiv2 conversion table for XMP metadata as
> "Iptc.Application2.Urgency". The
> value 1 here means 5 stars. If a crop action carried out in the Image
> Editor,
> we copy the metadata and the 5 stars will appear.
>
> So the problem is, we ask for "Iptc.Application2.Urgency" in the rating
> search
> and get the entry for "photoshop:Urgency" from Exiv2, which is actually a
> color
> label tag.
>
> At the moment I don't have a right solution for this.
>
> Maik
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 8 Maik Qualmann 2023-05-03 20:29:48 UTC
I see this comment in the source code:

// NOTE : with digiKam 0.9.x, we have used IPTC Urgency to store Rating.
// Now this way is obsolete, and we use standard XMP rating tag instead.

When I look at the meaning of "Iptc.Application2.Urgency" it has something to do with the urgency of processing and not with the rating of an image. Gilles, I would suggest we remove "Iptc.Application2.Urgency" as a possible tag for rating. What do you think?

Maik
Comment 9 caulier.gilles 2023-10-15 03:52:39 UTC
Hi Maik,

Yes IPTC Urgency is and older way to store Rating when digiKam XMP+sidecar support was not yet usable. Now the situation is completely different and definitively, this can be removed at all.

Gilles
Comment 10 Maik Qualmann 2023-10-15 06:40:43 UTC
Git commit d5bc82d0b9ab724d1a16cf90e35c3295030475d4 by Maik Qualmann.
Committed on 15/10/2023 at 08:39.
Pushed by mqualmann into branch 'master'.

remove Iptc.Application2.Urgency as an rating metadata value
FIXED-IN: 8.2.0

M  +1    -1    NEWS
M  +0    -24   core/data/metadata/darktable.dkamp
M  +0    -24   core/data/metadata/digikam.dkamp
M  +1    -9    core/libs/metadataengine/dmetadata/dmetadatasettingscontainer.cpp

https://invent.kde.org/graphics/digikam/-/commit/d5bc82d0b9ab724d1a16cf90e35c3295030475d4
Comment 11 Maik Qualmann 2023-10-15 06:43:34 UTC
Note: For this change to take effect, the rating must be reset to the default in the advanced metadata settings or the digiKam profile must be imported using the profile load function.

Maik
Comment 12 caulier.gilles 2023-10-15 07:53:12 UTC
Git commit bbb2603eb75c734a56682bd86fdf53ce99a32939 by Gilles Caulier.
Committed on 15/10/2023 at 09:49.
Pushed by cgilles into branch 'master'.

digiKam online doc: remove the map of transcription of IPTC urgency corresponding to Rating

M  +1    -14   right_sidebar/captions_view.rst

https://invent.kde.org/documentation/digikam-doc/-/commit/bbb2603eb75c734a56682bd86fdf53ce99a32939