Fix creating sub-bitmap of wxGraphicsBitmap (GDI+)

Retrieved sub-bitmap should have the same pixel format like
the source bitmap.
This commit is contained in:
Artur Wieczorek
2021-02-05 23:53:28 +01:00
parent e73cb85246
commit 20fc422550

View File

@@ -2869,7 +2869,7 @@ wxGraphicsBitmap wxGDIPlusRenderer::CreateSubBitmap( const wxGraphicsBitmap &bit
wxNullGraphicsBitmap, wxS("Invalid bitmap region"));
wxGraphicsBitmap p;
p.SetRefData(new wxGDIPlusBitmapData( this , image->Clone( (REAL) x , (REAL) y , (REAL) w , (REAL) h , PixelFormat32bppPARGB) ));
p.SetRefData(new wxGDIPlusBitmapData( this , image->Clone( (REAL) x , (REAL) y , (REAL) w , (REAL) h , image->GetPixelFormat()) ));
return p;
}
else