add --transparent flag to shp->png conversion utility
This commit is contained in:
@@ -79,7 +79,8 @@ namespace OpenRA.Utility
|
|||||||
var dest = Path.ChangeExtension(src, ".png");
|
var dest = Path.ChangeExtension(src, ".png");
|
||||||
|
|
||||||
var srcImage = ShpReader.Load(src);
|
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))
|
using (var bitmap = new Bitmap(srcImage.ImageCount * srcImage.Width, srcImage.Height, PixelFormat.Format8bppIndexed))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ namespace OpenRA.Utility
|
|||||||
Console.WriteLine();
|
Console.WriteLine();
|
||||||
Console.WriteLine(" --settings-value KEY Get value of KEY from settings.yaml");
|
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(" --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");
|
Console.WriteLine(" --extract MOD[,MOD]* FILES Extract files from mod packages");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user