summaryrefslogtreecommitdiffstats
path: root/helper.h
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2015-07-18 08:52:46 +0200
committerArno <arno@disconnect.de>2015-07-18 08:52:46 +0200
commitb3ccbde0d3e540453b80709002cae0630172f1dc (patch)
treeb810c54996fde7f6f57b0ed8f31532c5ac8e82cc /helper.h
parenta53cf905aed8cc14c9120ad03b6f03fe1373fc2d (diff)
downloadSheMov-b3ccbde0d3e540453b80709002cae0630172f1dc.tar.gz
SheMov-b3ccbde0d3e540453b80709002cae0630172f1dc.tar.bz2
SheMov-b3ccbde0d3e540453b80709002cae0630172f1dc.zip
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...
Diffstat (limited to 'helper.h')
-rw-r--r--helper.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/helper.h b/helper.h
index f8d03a0..e78b827 100644
--- a/helper.h
+++ b/helper.h
@@ -16,6 +16,8 @@
#include <QJsonDocument>
#include <magic.h>
+#include <pictureviewer2.h>
+#include <ImageMagick-6/Magick++.h>
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();