Qimage QBuffer

QImage image;
QByteArray ba;
QBuffer buffer(&ba);
buffer.open(QIODevice::WriteOnly);
image.save(&buffer, "PNG"); // writes image into ba in PNG format

posted @ 2019-04-03 11:08  lehoho  阅读(649)  评论(0编辑  收藏  举报