*/
#include <QApplication>
+#include <QImageReader>
#include <QImage>
#include <QDebug>
return 2;
}
- QImage image(argv[3], "SVG");
+ QImageReader imagereader(argv[3], "SVG");
+ imagereader.setScaledSize(QSize(width, height));
+ QImage image = imagereader.read();
if (image.isNull()) {
- qWarning() << "Could not load" << argv[3];
+ qWarning() << "Cannot not read" << argv[3] << ":" << imagereader.errorString();
return 3;
}
- image = image.scaled(width, height, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
-
if (image.save(argv[4], "PNG") == false) {
qWarning() << "Could not save" << argv[4];
return 4;