I'm trying to add a small bitmap on a larger bitmap but the transparency of the small one is not transparent ! It's like if the opacity was 50%.
And the small image :
Then the result :
I don't understand why the background of the small image is not transparent but "pink".
Here is my code :
Bitmap baseImage;
Bitmap overlayImage;
baseImage = (Bitmap)Image.FromFile(Path.Combine(Directory.GetCurrentDirectory(), @"Assets", "Img", "background_blue.jpg"));
overlayImage = (Bitmap)Image.FromFile(Path.Combine(Directory.GetCurrentDirectory(), @"Assets", "Img", "circle_red.png"));
var finalImage = new Bitmap(overlayImage.Width, overlayImage.Height);
var graphics = Graphics.FromImage(finalImage);
graphics.CompositingMode = CompositingMode.SourceOver;
graphics.DrawImage(baseImage, 0, 0);
graphics.DrawImage(overlayImage, 0, 0);
//save the final composite image to disk
finalImage.Save(Path.Combine(Directory.GetCurrentDirectory(), @"Assets", "Img", "result.jpg"), System.Drawing.Imaging.ImageFormat.Jpeg);
Could you help me to understand what's going on, I'm completely lost ! :D