Without GUI an image is not available even if it is actually cached.
In this case we load the image for obtaining its dimensions in order
to correct the clipping bounding box.
This amends
380f34a1.
#include "support/Systemcall.h"
#include <QProcess>
+#include <QtGui/QImage>
#include <algorithm>
#include <sstream>
height = image->height();
}
}
+ // Even if cached, the image is not loaded without GUI
+ if (width == 0 && height == 0) {
+ QImage image(toqstr(file.absFileName()));
+ width = image.width();
+ height = image.height();
+ }
if (width == 0 || height == 0)
return;