PDA

View Full Version : i have a problem with qimage in qt5



newgod
24th January 2013, 04:25
QImage image;
image.load("/var/project/0x14Server/20132323222329852.gif");

QImage imageMain = image.scaled(163,223,Qt::KeepAspectRatio);
if(imageMain.isNull()){
qDebug() << "sss";
}else{
imageMain.save("/var/www/novel/BookImages/2013/01/23/aa.jpg","jpg");
}


before i using qt5,this code runing with qt4.8 , and there is no problem
now i using qt5
i got a message like this : "qimage is a null image" or sometimes program just exit

wysota
25th January 2013, 18:26
Do you have the gif image plugin installed?