Skip to content
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Qt 6.12 LTS is out! See what's new in the release blog
  • Save QImage to Base64 String

    Unsolved General and Desktop qimage qbytearray qbuffer base64
    11
    0 Votes
    11 Posts
    20k Views
    M
    This works QBuffer buffer; buffer.open(QIODevice::WriteOnly); QImage qp(fileName()); qp.save(&buffer, "PNG"); QString base64 = buffer.data().toBase64(); https://stackoverflow.com/questions/69165252/how-to-convert-png-image-into-base-64-format-in-qt