1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-01 00:45:26 +02:00

Fixes for pcx

This commit is contained in:
nordsoft
2022-11-19 00:09:28 +04:00
parent 0d9f7d15a2
commit 3e7e29c714

View File

@ -63,7 +63,7 @@ namespace BitmapHandler
{ {
it = 0xC; it = 0xC;
//auto bitmap = QBitmap::fromData(qsize, pcx + it); //auto bitmap = QBitmap::fromData(qsize, pcx + it);
QImage image(pcx + it, width, height, QImage::Format_Indexed8); QImage image(pcx + it, width, height, width, QImage::Format_Indexed8);
//palette - last 256*3 bytes //palette - last 256*3 bytes
QVector<QRgb> colorTable; QVector<QRgb> colorTable;
@ -81,7 +81,7 @@ namespace BitmapHandler
} }
else else
{ {
QImage image(pcx + it, width, height, QImage::Format_RGB32); QImage image(pcx + it, width, height, width * 4, QImage::Format_RGB32);
return image; return image;
} }
} }