Bug 484183 - No thumbnails for images with more than 32 bits per pixel
Summary: No thumbnails for images with more than 32 bits per pixel
Status: RESOLVED FIXED
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: Thumbnails and previews (show other bugs)
Version: 24.02.1
Platform: Other Linux
: VHI normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 476884 483106 483380 483536 483560 483561 483867 484180 484374 484734 485065 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-03-21 19:40 UTC by Nicolas Fella
Modified: 2024-04-05 13:04 UTC (History)
8 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Fella 2024-03-21 19:40:01 UTC
Dolphin fails to generate thumbnails for images with more than 32 bits per pixel (across various formats).

See duplicate reports for concrete examples
Comment 1 Nicolas Fella 2024-03-21 19:40:10 UTC
*** Bug 483106 has been marked as a duplicate of this bug. ***
Comment 2 Nicolas Fella 2024-03-21 19:40:24 UTC
*** Bug 483536 has been marked as a duplicate of this bug. ***
Comment 3 Nicolas Fella 2024-03-21 19:40:33 UTC
*** Bug 483560 has been marked as a duplicate of this bug. ***
Comment 4 Nicolas Fella 2024-03-21 19:40:47 UTC
*** Bug 484180 has been marked as a duplicate of this bug. ***
Comment 5 Nicolas Fella 2024-03-21 19:40:57 UTC
*** Bug 483867 has been marked as a duplicate of this bug. ***
Comment 6 Nicolas Fella 2024-03-21 19:41:55 UTC
*** Bug 483380 has been marked as a duplicate of this bug. ***
Comment 7 Nicolas Fella 2024-03-21 19:42:26 UTC
*** Bug 483561 has been marked as a duplicate of this bug. ***
Comment 8 Bug Janitor Service 2024-03-21 19:52:05 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/kio-extras/-/merge_requests/341
Comment 9 Nicolas Fella 2024-03-22 10:59:41 UTC
Git commit c169a773cc55466417198847a9b6328df6cd4250 by Nicolas Fella.
Committed on 21/03/2024 at 19:51.
Pushed by nicolasfella into branch 'master'.

[thumbnail] Limit bits per pixel to 32

PreviewJob allocates shared memory for transferring the thumbnail data. There it assumes max. 32 bits per pixel

Now when we load an image with 64 bpp we fail to send it because not enough memory was allocated

To avoid this convert the image to a 32bit format if neccesary

For a small thumbnail we don't really need that much color bits anyway

M  +2    -1    thumbnail/thumbnail.cpp

https://invent.kde.org/network/kio-extras/-/commit/c169a773cc55466417198847a9b6328df6cd4250
Comment 10 Nicolas Fella 2024-03-22 11:00:17 UTC
Git commit fe1b4b23c38cbf5c37625ef43fd732e2afaf1084 by Nicolas Fella.
Committed on 22/03/2024 at 11:00.
Pushed by nicolasfella into branch 'release/24.02'.

[thumbnail] Limit bits per pixel to 32

PreviewJob allocates shared memory for transferring the thumbnail data. There it assumes max. 32 bits per pixel

Now when we load an image with 64 bpp we fail to send it because not enough memory was allocated

To avoid this convert the image to a 32bit format if neccesary

For a small thumbnail we don't really need that much color bits anyway
(cherry picked from commit c169a773cc55466417198847a9b6328df6cd4250)

M  +2    -1    thumbnail/thumbnail.cpp

https://invent.kde.org/network/kio-extras/-/commit/fe1b4b23c38cbf5c37625ef43fd732e2afaf1084
Comment 11 Junakreiter 2024-03-22 15:42:48 UTC
Is it really a matter of memory ? 
I can save a 16 bit tiff with 290 kiB and still no thumbnail is created.
Comment 12 Nicolas Fella 2024-03-22 15:50:42 UTC
It doesn't matter how small or large the image is. The code allocates exactly as much memory as it needs for the image, but while doing it it assumes that 32 bit/4bytes are needed per pixel.

See https://invent.kde.org/frameworks/kio/-/blob/master/src/gui/previewjob.cpp?ref_type=heads#L802
Comment 13 Christoph Feck 2024-03-23 02:32:42 UTC
*** Bug 476884 has been marked as a duplicate of this bug. ***
Comment 14 Nicolas Fella 2024-03-24 11:03:09 UTC
*** Bug 484374 has been marked as a duplicate of this bug. ***
Comment 15 Antonio Rojas 2024-03-30 08:23:27 UTC
*** Bug 484734 has been marked as a duplicate of this bug. ***
Comment 16 Nicolas Fella 2024-04-05 13:04:45 UTC
*** Bug 485065 has been marked as a duplicate of this bug. ***