public void AddMipMap(int mipMap, string fileName)
{
int width;
int height;
byte[] bitmap = this.LoadImage(fileName, out width, out height);
int expectedWidth = this.width / (int)Math.Pow(2, mipMap);
int expectedHeight = this.height / (int)Math.Pow(2, mipMap);
if (width != expectedWidth || height != expectedHeight)
throw new Exception("invalid mipmap size");
this.Update(bitmap, mipMap);
}