Summary: | Gwenview Removed Support for All RAW Files (Regression) | ||
---|---|---|---|
Product: | [Applications] gwenview | Reporter: | John <kdelovaa> |
Component: | general | Assignee: | Gwenview Bugs <gwenview-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | koshikas, mircomir, mkyral, nate, nicolas.fella, sine.nomine |
Priority: | NOR | ||
Version: | 22.12.0 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/graphics/gwenview/commit/c419ec4a052b39eae7c17caf2a89d39d76b43777 | Version Fixed In: | 22.12.2 |
Sentry Crash Report: |
Description
John
2022-12-16 20:20:44 UTC
Mirco, you worked a lot on RAW stuff, any idea what's going on here? (In reply to Nicolas Fella from comment #1) > Mirco, you worked a lot on RAW stuff, any idea what's going on here? If I disable libkdcraw support and recompile Gwenview, the raw files are displayed correctly. Gwenview treats RAW files differently from other images assuming there is no plugin capable of reading them. There is probably a logical conflict within the code due to the presence of the plugin. The solutions can be the following: 1- disable KDCraw search from CMakeList of Gwenview (find_package(KF5KDcraw)) 2- patch Gwenview to contemplate the presence of the plug-in Solution 1 makes loading RAW files slow (plugin by default looks for maximum quality). To speed up the loading I added a hack to the plugin: by setting the quality to 1 in QImageReader, it does more or less what KDCraw does and makes loading much faster (sa: https://invent.kde.org/frameworks/kimageformats/-/blob/master/src/imageformats/raw_p.h). So, the solution 2 could be a) check if raw plugin is installed: set quality on raw file loading and bypass the KDRaw code or b) use the current code an fix it to coexist with raw plugin (when installed). I'm not familiar with Gwenview code, so I should do a deep debugging. Solution a) could be solved with a few lines of code. I have the same issue. RAW files works correctly in latest gwenview with kimageformats-5.98. But after update kimageformats to version 5.99+, RAW images fails to load. This is a possible fix: https://invent.kde.org/graphics/gwenview/-/merge_requests/174 Git commit a7dc8feefc2147a08526b61bf361b63f78645ea0 by Nate Graham, on behalf of Mirco Miranda. Committed on 10/01/2023 at 14:53. Pushed by ngraham into branch 'master'. Fixed coexistence between Qt Raw plugin and KDcraw Use the RAW plugin to load raw images if installed: - Previews are always generated from the RAW image at the fastest possible speed. - Images are loaded in the highest possible quality (default plugin raw). - If the raw plugin is not installed everything works as before (use KDcraw). FIXED-IN: 22.12.2 M +2 -1 lib/document/loadingdocumentimpl.cpp M +7 -1 lib/thumbnailprovider/thumbnailgenerator.cpp https://invent.kde.org/graphics/gwenview/commit/a7dc8feefc2147a08526b61bf361b63f78645ea0 Git commit c419ec4a052b39eae7c17caf2a89d39d76b43777 by Nate Graham, on behalf of Mirco Miranda. Committed on 10/01/2023 at 14:59. Pushed by ngraham into branch 'cherry-pick-a7dc8fee'. Fixed coexistence between Qt Raw plugin and KDcraw Use the RAW plugin to load raw images if installed: - Previews are always generated from the RAW image at the fastest possible speed. - Images are loaded in the highest possible quality (default plugin raw). - If the raw plugin is not installed everything works as before (use KDcraw). FIXED-IN: 22.12.2 (cherry picked from commit a7dc8feefc2147a08526b61bf361b63f78645ea0) M +2 -1 lib/document/loadingdocumentimpl.cpp M +7 -1 lib/thumbnailprovider/thumbnailgenerator.cpp https://invent.kde.org/graphics/gwenview/commit/c419ec4a052b39eae7c17caf2a89d39d76b43777 I have no idea why Qt Raw plugin is being preferred over KDCraw, but the current implementation bring serious feature regression: while KDCraw implementation extracts insplit second already generated (in camera) preview jpeg from the raw file, the Qt Raw plugin implementation generates the jpeg data from raw, which takes considerable time even on pretty fast HW (on 10 core i7 ~ 7s). The same applies even to the thumbnailing. Imagine a folder containing some 500 raw images and you can do the math yourself. This change renders raw support in gwenview virtually unusable. I'd suggest either fixing the Qt Raw plugin implementation so it utilizes the embedded hi-res preview or preferring kdcraw over qt raw plugin. https://bugs.kde.org/show_bug.cgi?id=454206 It looks like the kimageformats update changes what image format is hinted and that broke image loading by the KDCRaw pipeline. Hardcoding the image format to "jpeg" fixes the pipeline. However, as another fix was already implemented, effecrively ditching KDCRaw altogether and replacing it with QtRaw plugin that works but is slower by 2 orders of magnitude, for this fix/workaround to work one needs to also revert the previous "fix". |