Web Capture

Ask for help and post your question on how to use XnView MP.

Moderators: helmut, XnTriq, xnview

Post Reply
fscltp
Posts: 8
Joined: Tue Nov 06, 2012 7:31 pm

Web Capture

Post by fscltp »

I just found MP, nice! Have a question about web capture. This can do a print screen but of the entire page, very good. But the resolution could be higher, when I zoom in things are a little fuzzy. I couldn't find anywhere to change to a higher resolution?

Can this also capture sites where we have to log in? Like if we wanted to capture a thread in Facebook, lots of very useful horse information FB pages. But so far MP doesn't do anything and won't capture.

What I would love is to have MP capture videos in browsers. There are so many videos of beautiful horses, would like to capture them.
Mixer
Banned
Posts: 166
Joined: Fri Aug 28, 2015 6:24 am

Re: Web Capture

Post by Mixer »

As was pointed out by XnTriq in different thread (http://newsgroup.xnview.com/viewtopic.p ... 73#p130854),
XnTriq wrote: MP's Web capture command
utilizes functions of Qt WebKit engine. The only option to control it which XnView MP provides is setting for resulting image width. This function works as a standalone browser, not a plugin of any kind, and has no access to cache and cookies of other browsers to capture pages which use them.
At least I think so.

From the Qt 5.5 example code for capturing webpage snapshot (file framecapture.cpp) it seems there are few more options for webpage rendering, like setting Antialiasing, TextAntialiasing and SmoothPixmapTransform. But I have no experience with Qt and I don't know if this is the method used by XnView MP. Even if this is that method, MP doesn't let you turn antialiasing on or off, so all extrasmoothness is a bonus you can't refuse.

Code: Select all

void FrameCapture::saveFrame(QWebFrame *frame)
{
    static int frameCounter = 0;

    QString fileName(m_fileName);
    if (frameCounter) {
        int index = m_fileName.lastIndexOf('.');
        fileName = fileName.insert(index, "_frame" + QString::number(frameCounter));
    }

    QImage image(frame->contentsSize(), QImage::Format_ARGB32_Premultiplied);
    image.fill(Qt::transparent);

    QPainter painter(&image);
    painter.setRenderHint(QPainter::Antialiasing, true);
    painter.setRenderHint(QPainter::TextAntialiasing, true);
    painter.setRenderHint(QPainter::SmoothPixmapTransform, true);
    frame->documentElement().render(&painter);
    painter.end();

    image.save(fileName);

    ++frameCounter;
    foreach(QWebFrame *childFrame, frame->childFrames())
        saveFrame(childFrame);
}
The page where I got code was named "WebKit Frame Capture Example" and is currently removed from Qt documentation, but is still available through Google cache.

If XnView MP will move to newer version of Qt, which is 5.6, you'll have another webrendering engine, since
Qt WebEngine supercedes the Qt WebKit module, which is based on the WebKit project, but has not been actively synchronized with the upstream WebKit code since Qt 5.2 and has been deprecated in Qt 5.5.
Quote from https://doc-snapshots.qt.io/qt5-5.6/qtw ... rview.html
So after all porting to new engine done it will be a different story about rendering.

And for capturing videos of whorses there are plenty of plugins and addons for different browsers, utilities which let you view your browser cache, and online services which help you get a link for video download.
fscltp
Posts: 8
Joined: Tue Nov 06, 2012 7:31 pm

Re: Web Capture

Post by fscltp »

I just found MP today so this is my first time visit here. The capture of MP is really good, works well and is easy to do. Maybe the more MP advances it might offer more resolution.

I know there are various addons and all that to capture videos from the browser. I really like the way MP works so was hoping for video too. I am very impressed with MP
Post Reply