Bug 460991 - Determine thumbnail image in group by image type.
Summary: Determine thumbnail image in group by image type.
Status: REPORTED
Alias: None
Product: digikam
Classification: Applications
Component: Albums-ItemGroup (show other bugs)
Version: 8.3.0
Platform: Other Other
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-25 16:28 UTC by Jan van Bekkum
Modified: 2024-05-12 07:18 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan van Bekkum 2022-10-25 16:28:09 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports

NEW FEATURE REQUEST
Determine thumbnail image in group by image type.

Use case:
I am using a 360-degree camera (Insta360 ONE X2). Per event the camera generates 3 image files. I group all files per event in a group. Because the images are very distorted it is hard to quickly scan the album content. Therefore 
I add processed video clips or a non-distorted snapshot of the event to the group. I would like these files in front as thumbnail. The files can be distinguished by extension: the non-distorted files have extension .mp4 or .jpg, the distorted ones have .insv.
***


STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Maik Qualmann 2022-10-25 17:26:37 UTC
If you group manually, you can specify which image is at the front. When grouping by filename, the image with the smallest file size is placed at the front.
The newly created thumbnail image only has to be smaller than the original files.

Maik
Comment 2 Jan van Bekkum 2022-10-25 19:56:07 UTC
Thanks!

I had found the manual way by dragging the ones to be not on top to the one to be on top. I should be able to make the snapshots smaller than all the other ones.
Comment 3 baloe 2024-05-11 14:16:33 UTC
I was unable to figure out how to manually override the default order. Putting the smallest file on top is a legit approach, but so is the ability to define a default stack order by file type.
I would NEVER want a raw file (e.g. *.NEF) to become the group image if there is a JPEG. Yet, I have many NEF/JPEG combos from many years ago, where the JPEG is larger than the NEF.
Comment 4 Maik Qualmann 2024-05-11 17:36:00 UTC
If you do grouping by filename, the JPEG will always be on top as it certainly has the smaller file size over the RAW. There is no stacking order in the grouping, there is only one image that is on top and is displayed.

Maik
Comment 5 baloe 2024-05-11 19:26:23 UTC
(In reply to Maik Qualmann from comment #4)
> If you do grouping by filename, the JPEG will always be on top as it
> certainly has the smaller file size over the RAW. There is no stacking order
> in the grouping, there is only one image that is on top and is displayed.
> 
> Maik

As I wrote above, I do have plenty of JPEG files that are (slightly) larger than their accompanying NEF raw files.
I begged my computer to change its mind, but the computer says no, sorry.

The NEF files are 14bit Nikon D800 losslessly compressed raw files.
The JPEGs are 8bit, from Capture One at 100% quality setting, generated many years ago.

Those JPEGs are then around the same size as the NEF file, mostly a bit smaller, but plenty are a bit larger than the NEF files.
Maybe Nikon has a crazy good lossless compression, maybe they are lying about their compression being lossless, maybe Capture One had a bug in their compression algorithm, I don't know, and it's not the topic here either.

If I could, I would simply regenerate those JPEGs at a smaller quality setting, but I am no longer able to do so, because I don't have access to a Capture One license any more since switching to Darktable.
Of course, I could go through the tedious process of recompressing JPEGs where necessary to make them smaller than the NEF files, but that seems to be a bit absurd to me. Besides, the files have been in two incremental backups for years, replacing them now by smaller variants will still increase my backups without any real need.

So, being able to tell Digikam to prefer any other file format over NEF when choosing the top of the stack in a group would solve my problem, and there is a chance I am not the only one.

Bastian
Comment 6 baloe 2024-05-11 21:06:48 UTC
Remark:
Indeed, manual grouping allows one to invoke the order. One has to to ungroup, before dragging the bottom image into the top image.
However, any subsequent "Group by filename" will destroy the tedious work of putting grouped files in their manual order.
Comment 7 Maik Qualmann 2024-05-12 07:18:48 UTC
Git commit 1e85a0e7acf7650d2ac9d066bce912801adb3d39 by Maik Qualmann.
Committed on 12/05/2024 at 07:18.
Pushed by mqualmann into branch 'master'.

no RAW image as group leader if another format is available

M  +19   -3    core/app/items/utils/itemviewutilities.cpp

https://invent.kde.org/graphics/digikam/-/commit/1e85a0e7acf7650d2ac9d066bce912801adb3d39