QImage image(QString::fromLocal8Bit(iter->filePath.c_str()));
QByteArray ba;
QBuffer buf(&ba);
image.save(&buf, "jpg");
QByteArray hexed = ba.toBase64();
buf.close();
QString strImage(hexed);
qt 将图片转换为base64格式数据
最新推荐文章于 2024-07-18 21:02:00 发布