Trim empty space around edges of Shp(TD) frames.
Co-Authored-By: Paul Chote <pchote@users.noreply.github.com>
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user