Trim empty space around edges of Shp(TD) frames.

Co-Authored-By: Paul Chote <pchote@users.noreply.github.com>
This commit is contained in:
Gustas
2024-03-12 14:13:48 +02:00
committed by abcdefg30
parent 5164a11c15
commit 7b9a173f5a
2 changed files with 86 additions and 1 deletions

View File

@@ -229,6 +229,10 @@ namespace OpenRA.Graphics
var width = frame.Size.Width;
var height = frame.Size.Height;
if (width == 0 || height == 0)
return Array.Empty<byte>();
var data = new byte[4 * width * height];
unsafe
{