git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1330 993157c7-ee19-0410-b2c4-bb4e9862e678

This commit is contained in:
(no author)
2007-07-23 15:55:06 +00:00
parent d94b589650
commit 74b4d5d455
22 changed files with 80 additions and 536 deletions

View File

@@ -23,13 +23,11 @@ namespace PaletteUsage
foreach (byte b in ImageBytes(bitmap))
++f[b];
for (int i = 0; i < 256; i++)
{
if (i % 8 == 0)
Console.WriteLine();
Console.WriteLine("Unused palette entries:");
Console.Write("{0} -> {1}", i.ToString().PadLeft(3), f[i].ToString().PadRight(8));
}
for (int i = 0; i < 256; i++)
if (f[i] == 0)
Console.WriteLine("0x{0:x}\t\t{0}", i);
}
static IEnumerable<byte> ImageBytes(Bitmap bitmap)