public static Bitmap LoadBitmap(string filename, int stackIndex = 2)
{
Assembly executingAssembly;
string location;
GetLocation(filename, stackIndex, out executingAssembly, out location);
using (Stream stream = executingAssembly.GetManifestResourceStream(location))
{
Image image = Bitmap.FromStream(stream);
Bitmap bmp = image as Bitmap;
return bmp;
}
}