コード例 #1
0
 public static unsafe void CopyTo(this Bitmap bmp, Bitmap dest)
 {
     int w = Math.Min(bmp.Width, dest.Width);
     int h = Math.Min(bmp.Height, dest.Height);
     using (DIB dib = new DIB(w, h, dest.PixelFormat))
     {
         dib.ReadBitmap(bmp, w, h);
         dib.WriteBitmap(dest, w, h);
     }
 }