I am currently doing imageViewer.

I have a problem , when i scale a image , i find QImage::scale so slow.

this leads UI thread block.

my image file size is 3MB and size is 8900*8105.

Do you have any good Suggestions?

thanks.

Qt Code:
  1. QTime time;
  2. time.start();
  3. QImage image(imagePath);
  4. qDebug()<<"load image time elapsed is : "<<time.elapsed();//load image time elapsed is : 4407
  5. image.scaled(image.width() * 0.09 , image.height() * 0.09 , Qt::KeepAspectRatio , Qt::SmoothTransformation);
  6. qDebug()<<"scaled image time elapsed is : "<<time.elapsed();//scaled image time elapsed is : 5231
To copy to clipboard, switch view to plain text mode