[Interest] QPixmap or QImage::scaled() crash on iOS with smoothTransformation

Allan Sandfeld Jensen kde at carewolf.com
Sun Jul 19 23:16:30 CEST 2015


On Sunday 19 July 2015, maitai wrote:
> Arf...
> 
> Only solution is to go back to 5.4.2 for iOS?
> 
It should be fixed by 5.5.1, if you need smooth-scaling before then and can 
not build a new Qt binary, you can either overallocate the from image by one 
pixel or scale using the painter, something like this:

QImage dst(dstSize);
QPainter painter(&dst);
painter.drawImage(srcImage, dstImage, QRect(QPoint(), dstSize), 
Qt::SmoothScale);
painter.end();

For downscaling, QImage smooth scaling is better than the qpainter scaling, 
but for upscaling they are the same.



More information about the Interest mailing list