Beispiel #1
0
 public override Bitmap ToBitmap(Color[] pal, Rectangle rect)
 {
     if (_UsePalette)
     {
         if (pal == null)
         {
             return(null);
         }
         var palette = _Bitmap.Palette;
         for (int i = 0; i < 256; ++i)
         {
             palette.Entries[i] = pal[i];
         }
         _Bitmap.Palette = palette;
     }
     AbstractImage.AdjustRectangle(ref rect, _Bitmap);
     return(_Bitmap.Clone(rect, PixelFormat.Format32bppArgb));
 }
Beispiel #2
0
 public override Bitmap ToBitmap(Color[] pal, Rectangle rect)
 {
     AbstractImage.AdjustRectangle(ref rect, _Bitmap);
     return(_Bitmap.Clone(rect, System.Drawing.Imaging.PixelFormat.Format32bppArgb));
 }