Пример #1
0
        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);
        }
Пример #2
0
 protected void Initialize(BitmapInstanceInfo bitmap)
 {
     Initialize(bitmap.Width, bitmap.Height, bitmap.Buffer, bitmap.Format, bitmap.Palette);
 }
Пример #3
0
        public BitmapInstance(string filepath)
        {
            BitmapInstanceInfo bitmapInfo = LoadFromFile(filepath);

            Initialize(bitmapInfo);
        }