diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2009-11-13 07:07:29 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2009-11-13 07:07:29 (GMT) |
commit | 3794e55c2c8427dd8bd4f86af5e894cc80267881 (patch) | |
tree | 9067656d5e021a585a976fb84f73b94e161cae19 /src/plugins/imageformats/jpeg | |
parent | 7be079e1b1f13b58f5d69f86e5854edd25065532 (diff) | |
parent | 99b19431e6846a36a65f23d21a95140a081d1f1a (diff) | |
download | Qt-3794e55c2c8427dd8bd4f86af5e894cc80267881.zip Qt-3794e55c2c8427dd8bd4f86af5e894cc80267881.tar.gz Qt-3794e55c2c8427dd8bd4f86af5e894cc80267881.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Conflicts:
dist/changes-4.6.0
Diffstat (limited to 'src/plugins/imageformats/jpeg')
-rw-r--r-- | src/plugins/imageformats/jpeg/qjpeghandler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/imageformats/jpeg/qjpeghandler.cpp b/src/plugins/imageformats/jpeg/qjpeghandler.cpp index e5e5e80..54bbcda 100644 --- a/src/plugins/imageformats/jpeg/qjpeghandler.cpp +++ b/src/plugins/imageformats/jpeg/qjpeghandler.cpp @@ -753,7 +753,7 @@ static bool ensureValidImage(QImage *dest, struct jpeg_decompress_struct *info, *dest = QImage(size, format); if (format == QImage::Format_Indexed8) { - dest->setNumColors(256); + dest->setColorCount(256); for (int i = 0; i < 256; i++) dest->setColor(i, qRgb(i,i,i)); } @@ -863,7 +863,7 @@ static bool read_jpeg_image(QIODevice *device, QImage *outImage, } else if (cinfo.output_components == 1) { if (outImage->size() != QSize(sWidth, sHeight) || outImage->format() != QImage::Format_Indexed8) *outImage = QImage(sWidth, sHeight, QImage::Format_Indexed8); - outImage->setNumColors(256); + outImage->setColorCount(256); for (int i = 0; i < 256; ++i) outImage->setColor(i, qRgb(i,i,i)); } else { @@ -1066,7 +1066,7 @@ static bool write_jpeg_image(const QImage &sourceImage, QIODevice *device, int s case QImage::Format_MonoLSB: case QImage::Format_Indexed8: gray = true; - for (int i = image.numColors(); gray && i--;) { + for (int i = image.colorCount(); gray && i--;) { gray = gray & (qRed(cmap[i]) == qGreen(cmap[i]) && qRed(cmap[i]) == qBlue(cmap[i])); } |