During implementation of the RAW preview support in gwenview, a need for loadEmbeddedPreview able of loading the RAW data from QBuffer (not file) arose. Temporarily, I've implemented the function within gwenview. For the sake of better maintainability of the code it would be nice to have this feature implemented directly in libkdcraw. Proposed patch is attached. Reproducible: Always
Created attachment 83251 [details] proposed patch
From your patch you force libkdcraw client application to compile with libraw througn libkdcraw/kdcraw.h header : +//LibRaw includes + +#include <libraw/libraw.h> This is weird. client application don't need this dependency. To fix it, move this method : private: + // implements loadEmbeddedPreview once the LibRaw buffer is opened + static bool loadEmbeddedPreview(QByteArray&, LibRaw&); ... to kdcraw_p.h/.cpp and remove libraw header include from shared libkdcraw header. If you update this patch, it will be can included to git/master for next KDE 4.12. Do you have a git developer account ? Best Gilles Caulier
Created attachment 83264 [details] patch v2
Thanks for the brief reply. I modified the patch according to your comment. No, I don't have git developer account. Rgds, Martin
Git commit 84e6c3d3d29d580d9e94dfb68cbb294d43885381 by Gilles Caulier. Committed on 02/11/2013 at 13:33. Pushed by cgilles into branch 'master'. Apply patch #83264 from Martin Kyral to load embedded preview from a QBuffer RAW data container FIXED-IN: 4.0.0 M +30 -29 libkdcraw/kdcraw.cpp M +6 -0 libkdcraw/kdcraw.h M +52 -3 libkdcraw/kdcraw_p.cpp M +6 -2 libkdcraw/kdcraw_p.h http://commits.kde.org/libkdcraw/84e6c3d3d29d580d9e94dfb68cbb294d43885381