From b3ccbde0d3e540453b80709002cae0630172f1dc Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 18 Jul 2015 08:52:46 +0200 Subject: Automatically convert invalid jpg pics Well, seems that's Qt's ImageReader got pickier regarding jpeg-files. If the resulting QPixmap is null and void, try to convert them to png. This introduces a new dependency to ImageMagic++. I don't like it, but it works, kinda... I saw random crashes while testing... --- helper.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'helper.h') diff --git a/helper.h b/helper.h index f8d03a0..e78b827 100644 --- a/helper.h +++ b/helper.h @@ -16,6 +16,8 @@ #include #include +#include +#include class QString; class QFileInfo; @@ -37,6 +39,7 @@ namespace Helper { QPixmap preview(const QString &path); QImage snapshot(const QString &path, int where); QVariant picSize(const QString &path); + PicData convertToPng(PicData data); class Duration { public: Duration(); -- cgit v1.2.3-70-g09d2