Bug 457453 - missing AspectRatio in db information during a BQM process
Summary: missing AspectRatio in db information during a BQM process
Status: REPORTED
Alias: None
Product: digikam
Classification: Applications
Component: AdvancedRename-BatchQueueManager (show other bugs)
Version: unspecified
Platform: Other Other
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-03 16:17 UTC by fch22
Modified: 2022-08-03 16:42 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fch22 2022-08-03 16:17:19 UTC
SUMMARY
***
I wanted to test the use of db information during a BQM process to rename the filename
For example adding the aspectRatio of the picture in the file name (as I'm generating different format , I was thinking it could be helpful to add it automaticaly in the filename)

so I tried the following syntax :
[file]-ratio-[db:AspectRatio]-rating-[db:Rating]
but the result is
P6150094-ratio--rating-3.jpg
The rating is correct (I added it to check if the syntax was correct) , but the AspectRatio is missing (when I move the mouse on the picture it is showing the aspectRatio = 4:5 (1.3)  )

***


Answer from Gilles :
Look in the code, the implementations to get the keys from database
(in fact mostly collected from image metadata), are located in these 3
classes :

https://invent.kde.org/graphics/digikam/-/blob/master/core/utilities/advancedrename/parser/options/database/keys/commonkeys.cpp#L37

https://invent.kde.org/graphics/digikam/-/blob/master/core/utilities/advancedrename/parser/options/database/keys/metadatakeys.cpp#L35

https://invent.kde.org/graphics/digikam/-/blob/master/core/utilities/advancedrename/parser/options/database/keys/positionkeys.cpp#L36

None include aspect ratio information.

So it's not implemented. Please report a wish to bugzilla about this topic.

Best

Gilles Caulier
Comment 1 Maik Qualmann 2022-08-03 16:42:21 UTC
There are several problems here. The aspect ratio colon is a forbidden character for Windows file systems.
The database option in the renaming refers to the original file. I think you are expecting the aspect ratio of your newly created file. But the newly created file is not yet captured by the database at the point of renaming. The aspect ratio option might be a metadata option, but the rename string is already created before the BQM process. The BQM works without a database, only after the completion of all operations is the newly created file scanned.
The same problem exists when wanting to apply metadata, this could only be written directly to the file. Applying metadata to the database is not possible during the BQM process.

Maik