fixed System.IO.InvalidDataException`: Non-power-of-two array
This commit is contained in:
@@ -185,9 +185,9 @@ namespace OpenRA.Graphics
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
public static Bitmap RenderMapPreview(Map map)
|
||||
public static Bitmap RenderMapPreview(Map map, bool actualSize)
|
||||
{
|
||||
Bitmap terrain = TerrainBitmap(map, true);
|
||||
Bitmap terrain = TerrainBitmap(map, actualSize);
|
||||
return AddStaticResources(map, terrain);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ namespace OpenRA.Widgets
|
||||
uid = cacheUids.Peek();
|
||||
}
|
||||
|
||||
var bitmap = Minimap.RenderMapPreview(Game.modData.AvailableMaps[uid]);
|
||||
var bitmap = Minimap.RenderMapPreview(Game.modData.AvailableMaps[uid], false);
|
||||
lock (syncRoot)
|
||||
{
|
||||
// TODO: We should add previews to a sheet here (with multiple previews per sheet)
|
||||
|
||||
@@ -306,7 +306,7 @@ namespace OpenRA.Utility
|
||||
|
||||
Rules.LoadRules(Game.modData.Manifest, map);
|
||||
|
||||
var minimap = Minimap.RenderMapPreview(map);
|
||||
var minimap = Minimap.RenderMapPreview(map, true);
|
||||
|
||||
var dest = Path.GetFileNameWithoutExtension(args[1]) + ".png";
|
||||
minimap.Save(dest);
|
||||
|
||||
Reference in New Issue
Block a user