Convert to 32bbp internally in FastCopyIntoSprite.
This avoids the need for callers to ensure the pixel format is correct, but ensures that the copying succeeds when the format is different.
This commit is contained in:
@@ -156,12 +156,6 @@ namespace OpenRA
|
||||
SpawnPoints = spawns;
|
||||
|
||||
CustomPreview = new Bitmap(new MemoryStream(Convert.FromBase64String(r.minimap)));
|
||||
if (CustomPreview.PixelFormat != PixelFormat.Format32bppArgb)
|
||||
{
|
||||
var original = CustomPreview;
|
||||
CustomPreview = original.CloneWith32bbpArgbPixelFormat();
|
||||
original.Dispose();
|
||||
}
|
||||
}
|
||||
catch (Exception) { }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user