private BitmapInstanceImpl(System.Drawing.Bitmap bitmap) { BitmapInstanceInfo bitmapInfo = new BitmapInstanceInfo { Width = bitmap.Width, Height = bitmap.Height, Buffer = bitmap.GetPixels(), Format = bitmap.PixelFormat.ToAGSFormat(), Palette = bitmap.Palette.ToAGSPalette() }; Instance = bitmap; Initialize(bitmapInfo); }
protected void Initialize(BitmapInstanceInfo bitmap) { Initialize(bitmap.Width, bitmap.Height, bitmap.Buffer, bitmap.Format, bitmap.Palette); }
public BitmapInstance(string filepath) { BitmapInstanceInfo bitmapInfo = LoadFromFile(filepath); Initialize(bitmapInfo); }