public static Image CharacterStance(string filename, int pattern, int direction,
int hue = 0, int opacity = 255)
{
var image = Character(filename, hue, opacity);
var cw = image.Width / 4;
var ch = image.Height / 4;
var sx = pattern * cw;
var sy = (direction - 2) / 2 * ch;
var tile = new Bitmap(cw, ch);
using (var g = Graphics.FromImage(tile))
g.DrawImage(image, new Rectangle(0, 0, cw, ch), sx, sy, cw, ch, GraphicsUnit.Pixel);
GC.Collect(GC.GetGeneration(image), GCCollectionMode.Forced);
return tile;
}