diff --git a/src/calibre/utils/imageops/imageops.cpp b/src/calibre/utils/imageops/imageops.cpp index 788fd23a69..5d56d6bce3 100644 --- a/src/calibre/utils/imageops/imageops.cpp +++ b/src/calibre/utils/imageops/imageops.cpp @@ -7,7 +7,6 @@ #include #include "imageops.h" -#include #include #include @@ -140,7 +139,7 @@ QImage grayscale(const QImage &image) { // {{{ row = reinterpret_cast(img.scanLine(r)); for (pixel = row; pixel < row + width; pixel++) { gray = qGray(*pixel); - *pixel = QColor(gray, gray, gray).rgba(); + *pixel = qRgb(gray, gray, gray); } } return img;