Version: 1.2.0 (using KDE 4.4.2) OS: Linux Installed from: openSUSE RPMs For some image files the preview fails with the message "Cannot display preview for [file]". The very same images load fine in other apps (eg Gwenview).
Created attachment 42824 [details] sample image Sample image which displays fine in Gwenview but fails to load in DigiKam.
Please enable all debugging for digikam in kdedebugdialog, run digikam in the console, try to load such an image and paste the console output here.
By uploading that sample file here I just realized that it is indeed a png wrongly named .jpg - renaming it to .png solves the issue. Maybe you could look into loading such files anyway or even offering to rename them? Otherwise consider this solved.
Zen, This file still valid with 2.x series ? Gilles Caulier
This file still valid using last 2.6.0 release ? Gilles Caulier
Same problem here with Digikam 2.7 under OpenSuse 12.1 but only with TIFF files without a single exception (+8000 images).
Reproducible with digiKam 4.2.0. Image cannot be loaded in digiKam... Gilles Caulier
Created attachment 97166 [details] imageLoader.patch When image loading fails with a default loader and the query was not been canceled, we use the QImage loader. The QImage loader now uses only the file content for the format detection. Maik
Created attachment 97167 [details] imageLoader2.patch Fix compile warning. Maik
Patch is fine for me. Tested with sample provided on this bug entry Gilles
Git commit 77876ae91081a88fb6b766403f05a03ca519173b by Maik Qualmann. Committed on 13/02/2016 at 15:38. Pushed by mqualmann into branch 'master'. try QImage loader when default image loader fails FIXED-IN: 5.0.0 M +2 -1 NEWS M +14 -13 libs/dimg/dimg.cpp M +5 -1 libs/dimg/loaders/qimageloader.cpp http://commits.kde.org/digikam/77876ae91081a88fb6b766403f05a03ca519173b