add --transparent flag to shp->png conversion utility

This commit is contained in:
Chris Forbes
2011-10-04 22:31:02 +13:00
parent fb8fdb5899
commit 49a758f031
2 changed files with 3 additions and 2 deletions

View File

@@ -79,7 +79,8 @@ namespace OpenRA.Utility
var dest = Path.ChangeExtension(src, ".png");
var srcImage = ShpReader.Load(src);
var palette = Palette.Load(args[2], false);
var shouldRemap = args.Contains( "--transparent" );
var palette = Palette.Load(args[2], shouldRemap);
using (var bitmap = new Bitmap(srcImage.ImageCount * srcImage.Width, srcImage.Height, PixelFormat.Format8bppIndexed))
{

View File

@@ -57,7 +57,7 @@ namespace OpenRA.Utility
Console.WriteLine();
Console.WriteLine(" --settings-value KEY Get value of KEY from settings.yaml");
Console.WriteLine(" --shp PNGFILE FRAMEWIDTH Convert a PNG containing one or more frames to a SHP");
Console.WriteLine(" --png SHPFILE PALETTE Convert a SHP to a PNG containing all of its frames");
Console.WriteLine(" --png SHPFILE PALETTE [--transparent] Convert a SHP to a PNG containing all of its frames, optionally setting up transparency");
Console.WriteLine(" --extract MOD[,MOD]* FILES Extract files from mod packages");
}