void MainWindow::testQImageScaled(){
QImage img (50, 50, QImage::Format_ARGB32);
Q_ASSERT (img.format() == QImage::Format_ARGB32);
img.fill(Qt::red);
Q_ASSERT (img.format() == QImage::Format_ARGB32);
QImage imgScaled = img.scaled(100, 100, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
Q_ASSERT (img.format() == QImage::Format_ARGB32);
if (imgScaled.format() == QImage::Format_ARGB32_Premultiplied)
qDebug()<<"Format was implicitly changed from ARGB32 to ARGB32_Premultiplied with no notes in documentation about this.";
Q_ASSERT (imgScaled.format() == QImage::Format_ARGB32);
}