https://bugs.kde.org/show_bug.cgi?id=463989

            Bug ID: 463989
           Summary: Remote RAW image previews don't work because of
                    missing file extension in thumbnail temp file
    Classification: Frameworks and Libraries
           Product: frameworks-kio
           Version: 5.101.0
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: kio-bugs-n...@kde.org
          Reporter: accounts+...@chiller3.com
                CC: kdelibs-b...@kde.org
  Target Milestone: ---

SUMMARY

In Dolphin, when browsing a directory containing RAW image files (eg. Canon's
.cr2), previews work for local files, but not remote files. I believe I've
tracked down the reason:

On the Dolphin side, when it runs the PreviewJob, it takes this code path for
remote files:
https://invent.kde.org/frameworks/kio/-/blob/v5.101.0/src/widgets/previewjob.cpp#L742.
This creates a file called /tmp/dolphin.XXXXXX, which is passed to the
thumbnailer.

On the kioslave/thumbnail.so side, RAWCreator::create() is called as expected
(https://invent.kde.org/graphics/kdegraphics-thumbnailers/-/blob/v22.12.0/raw/rawcreator.cpp#L47),
which then calls
https://invent.kde.org/graphics/libkdcraw/-/blob/v22.12.0/src/kdcraw.cpp#L87.
KDcraw::loadEmbeddedPreview() returns false because of the
`!rawFilesExt.toUpper().contains(ext)` condition. libkdcraw requires the
filename to have a known file extension.

Off the top of my head, it seems like there are a couple ways to solve this:

1. Change libkdcraw to not depend on the file extension (not sure how feasible
this is).

2. Change kio so that the temporary file it creates has the original file
extension.

STEPS TO REPRODUCE

1. In Dolphin, change the settings for the max file limit for remote
thumbnails.
2. Navigate to a remote folder containing RAW images.

OBSERVED RESULT

There are no thumbnails.

EXPECTED RESULT

Thumbnails should be shown.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Fedora 37
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.7

ADDITIONAL INFORMATION

(Included above)

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to