我正在使用QT 5.9.2,我编写了以下代码以png格式保存25.8Mbytes的图像:
auto urlImage = QUrl(QString("%1/ref.png").arg(url.toString()));
qInfo() << QObject::tr("Save image") << urlImage.toLocalFile();
image_.save(urlImage.toLocalFile());
qInfo() << QObject::tr("Done:")<<image_.width()<<"x"<<image_.height();
,以下是日志信息:
[75432] [17:00:15.175] [+] "Save image" "c:/Users/Administrator/Desktop/Models/1/18-07-16-16-03-41/ref.png"
[75432] [17:00:39.538] [+] "Done:" 7296 x 2885
image_是QImage,保存方法花费了20多秒钟!我该如何加快速度。