Windows: Remove duplicated color masks in qt_write/write_dibv5.

They are apparently a relic of some old bitmap header that
did not contain them (superseded by BITMAPV5HEADER).

Task-number: QTBUG-45265
Change-Id: I993dda7d409f7963c9fabd42b0fac5f5586c6248
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
This commit is contained in:
Friedemann Kleint 2015-03-27 14:17:56 +01:00
parent 3203ac3f4e
commit 61101bd958

View File

@ -166,11 +166,6 @@ static bool qt_write_dibv5(QDataStream &s, QImage image)
if (s.status() != QDataStream::Ok)
return false;
DWORD colorSpace[3] = {0x00ff0000,0x0000ff00,0x000000ff};
d->write(reinterpret_cast<const char*>(colorSpace), sizeof(colorSpace));
if (s.status() != QDataStream::Ok)
return false;
if (image.format() != QImage::Format_ARGB32)
image = image.convertToFormat(QImage::Format_ARGB32);
@ -255,10 +250,6 @@ static bool qt_read_dibv5(QDataStream &s, QImage &image)
}
image.setDotsPerMeterX(bi.bV5XPelsPerMeter);
image.setDotsPerMeterY(bi.bV5YPelsPerMeter);
// read color table
DWORD colorSpace[3];
if (d->read((char *)colorSpace, sizeof(colorSpace)) != sizeof(colorSpace))
return false;
red_shift = calc_shift(red_mask);
green_shift = calc_shift(green_mask);