Bloom.ImageProcessing.ImageUtils.DrawImageWithWhiteBackground C# (CSharp) Method

DrawImageWithWhiteBackground() private static method

private static DrawImageWithWhiteBackground ( Image source, Bitmap target ) : void
source Image
target System.Drawing.Bitmap
return void
        private static void DrawImageWithWhiteBackground(Image source, Bitmap target)
        {
            Rectangle rect = new Rectangle(Point.Empty, source.Size);
            using (Graphics g = Graphics.FromImage(target))
            {
                g.Clear(Color.White);
                g.DrawImageUnscaledAndClipped(source, rect);
            }
        }