Hello everybody,
I am able to capture a frame using grabWindow method
QPixmap bilde
= QPixmap::grabWindow(videoPlayer
->videoWidget
()->winId
());
QPixmap bilde = QPixmap::grabWindow(videoPlayer->videoWidget()->winId());
To copy to clipboard, switch view to plain text mode
How can I use built in phonon snapshot function, all I get is that picture size is 0x0 px.
bilde = videoPlayer->videoWidget()->snapshot();
qDebug()<<"Bildes izmers:" << bilde.size();
if (bilde.size().isEmpty())
{
qDebug()<<"Mainigaja bilde, nav datu!";
}
else
{
bool saved = bilde.save("snap.jpg", "JPG", 100);
qDebug() << "Vai saglabaja?" << saved;
}
QImage bilde;
bilde = videoPlayer->videoWidget()->snapshot();
qDebug()<<"Bildes izmers:" << bilde.size();
if (bilde.size().isEmpty())
{
qDebug()<<"Mainigaja bilde, nav datu!";
}
else
{
bool saved = bilde.save("snap.jpg", "JPG", 100);
qDebug() << "Vai saglabaja?" << saved;
}
To copy to clipboard, switch view to plain text mode
I want to try VideoWidget::snapshot, because my video feed is 1080x720px, but my videoPlayer widget is 720x480px and I want to capture full sized video frame, with grabWindow method I only can save picture with the same size as the widget.
Is there a method to capture full size video frame with grabWindow method?
Why VideoWidget::snapshot function isn't working?
I'm using kubuntu 11.04 with Qt 4.7.2
Best Regards
Raivis
Bookmarks