From 6a0d4608a0f794b2983c502e93abb5a53ae6c983 Mon Sep 17 00:00:00 2001 From: Dean Ellis Date: Mon, 1 Feb 2016 23:04:52 +0000 Subject: [PATCH] Fixed #1946 Turns out the Image needs to be cleared first otherwise the colors bleed. --- MonoGame.Framework/Graphics/ImageEx.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/MonoGame.Framework/Graphics/ImageEx.cs b/MonoGame.Framework/Graphics/ImageEx.cs index ca4364b8064..617835fcb5e 100644 --- a/MonoGame.Framework/Graphics/ImageEx.cs +++ b/MonoGame.Framework/Graphics/ImageEx.cs @@ -38,6 +38,7 @@ internal static Image RGBToBGR(this Image bmp) ia.SetColorMatrix(cm); using (System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(newBmp)) { + g.Clear(Color.Transparent); g.DrawImage(bmp, new System.Drawing.Rectangle(0, 0, bmp.Width, bmp.Height), 0, 0, bmp.Width, bmp.Height, System.Drawing.GraphicsUnit.Pixel, ia); } }