Hi all,
I'm triyng to save a image buffer only grey into an image.
When I save to a file a get an error saying QVector<T> out of range.
Is there something I'm missing?
Thanks in advance for any answer
memcpy(tmp.bits(), pFrame->data[0], width * height);
QString filename
= QString("C:\\testscene\\frame%1.jpg").
arg(durationText
);
tmp.scaledToHeight(120, Qt::SmoothTransformation).save(filename);
QImage tmp(width, height, QImage::Format_Indexed8);
memcpy(tmp.bits(), pFrame->data[0], width * height);
QString filename = QString("C:\\testscene\\frame%1.jpg").arg(durationText);
tmp.scaledToHeight(120, Qt::SmoothTransformation).save(filename);
To copy to clipboard, switch view to plain text mode
Bookmarks