Selaa lähdekoodia

Fixes for pcx

nordsoft 2 vuotta sitten
vanhempi
sitoutus
3e7e29c714
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      mapeditor/BitmapHandler.cpp

+ 2 - 2
mapeditor/BitmapHandler.cpp

@@ -63,7 +63,7 @@ namespace BitmapHandler
 		{
 			it = 0xC;
 			//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
 			QVector<QRgb> colorTable;
@@ -81,7 +81,7 @@ namespace BitmapHandler
 		}
 		else
 		{
-			QImage image(pcx + it, width, height, QImage::Format_RGB32);
+			QImage image(pcx + it, width, height, width * 4, QImage::Format_RGB32);
 			return image;
 		}
 	}