fixed System.IO.InvalidDataException`: Non-power-of-two array

This commit is contained in:
Matthias Mailänder
2013-12-05 19:31:24 +01:00
parent 52ecac7336
commit 8d9282811b
3 changed files with 4 additions and 4 deletions

View File

@@ -185,9 +185,9 @@ namespace OpenRA.Graphics
return bitmap; 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); return AddStaticResources(map, terrain);
} }
} }

View File

@@ -170,7 +170,7 @@ namespace OpenRA.Widgets
uid = cacheUids.Peek(); uid = cacheUids.Peek();
} }
var bitmap = Minimap.RenderMapPreview(Game.modData.AvailableMaps[uid]); var bitmap = Minimap.RenderMapPreview(Game.modData.AvailableMaps[uid], false);
lock (syncRoot) lock (syncRoot)
{ {
// TODO: We should add previews to a sheet here (with multiple previews per sheet) // TODO: We should add previews to a sheet here (with multiple previews per sheet)

View File

@@ -306,7 +306,7 @@ namespace OpenRA.Utility
Rules.LoadRules(Game.modData.Manifest, map); Rules.LoadRules(Game.modData.Manifest, map);
var minimap = Minimap.RenderMapPreview(map); var minimap = Minimap.RenderMapPreview(map, true);
var dest = Path.GetFileNameWithoutExtension(args[1]) + ".png"; var dest = Path.GetFileNameWithoutExtension(args[1]) + ".png";
minimap.Save(dest); minimap.Save(dest);