Commit 103261c8 authored by Till Theato's avatar Till Theato
Browse files

fix Qt 4.5 compile

svn path=/trunk/kdenlive/; revision=4589
parent 46d01106
......@@ -252,12 +252,13 @@ void Vectorscope::calculateScope()
QRgb px;
// Just an average for the number of image pixels per scope pixel.
double avgPxPerPx = (double) 4*img.byteCount()/scope.size().width()/scope.size().height()/skipPixels;
// NOTE: byteCount() has to be replaced by (img.bytesPerLine()*img.height()) for Qt 4.5 to compile, see: http://doc.trolltech.org/4.6/qimage.html#bytesPerLine
double avgPxPerPx = (double) 4*(img.bytesPerLine()*img.height())/scope.size().width()/scope.size().height()/skipPixels;
qDebug() << "Expecting " << avgPxPerPx << " pixels per pixel.";
const QRect scopeRect(QPoint(0,0), scope.size());
for (int i = 0; i < img.byteCount(); i+= stepsize) {
for (int i = 0; i < (img.bytesPerLine()*img.height()); i+= stepsize) {
QRgb *col = (QRgb *) bits;
r = qRed(*col);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment