⚠️ Forum Maintenance: Feb 6th, 8am - 14pm (UTC+2)

Save the image shown by QWebEngineView

  • I can open and show this image on the webview.


    How could I get the image already captured by the web view?This image already exist in the view, there should be someway to get it without downloading the image again.

    A naive solution is QClipboard

    QClipboard *clipboard = QGuiApplication::clipboard();
    QImage img = clipboard->image(QClipboard::Clipboard);
            qDebug()<<"can save image yeah:"<<img.save("smoke.jpg");
            qDebug()<<"cannot copy to clipboard";

    Problem of this solution is I have no way to stop another operation which could affect the contents of global clipboard, besides the image is different with the origin. Do I have a way to read the image buffer captured by the QWebEngineView(or Page?)? Thanks

  • I am scraping images, so far the images could be downloaded are around 90%(it depends), following are my guest, if I can open and download the image by web engine, those servers could have a higher chances to believe "I am a human", that is why I want to try on using web engine to download the image

Log in to reply