This project is read-only.

Transparent Background Color

Jul 12, 2011 at 12:10 AM

It would be nice if it was possible to export an image with Transparency.

I am currently exporting an image with the following code, but am unable to get a transparent background color.


    Bitmap bitmap = new Bitmap(map.MapFrame.ImageRectangle.Width, map.MapFrame.ImageRectangle.Height);
            map.BackColor = Color.Transparent;
            map.DrawToBitmap(bitmap, map.ClientRectangle);
            Image img = bitmap;
            string fileName = @"c:\Temp\test" + Guid.NewGuid().ToString() + ".png";
            img.Save(fileName, System.Drawing.Imaging.ImageFormat.Png);


I think you can make the control have a transparent bg in the source code if you applied the following code linked below.


Anyways.. It would be a nice addition.