diff options
author | Arno <arno@disconnect.de> | 2015-07-18 08:52:46 +0200 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2015-07-18 08:52:46 +0200 |
commit | b3ccbde0d3e540453b80709002cae0630172f1dc (patch) | |
tree | b810c54996fde7f6f57b0ed8f31532c5ac8e82cc /helper.h | |
parent | a53cf905aed8cc14c9120ad03b6f03fe1373fc2d (diff) | |
download | SheMov-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.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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(); |