I'm actually trying to add some text to an image in C# with
System.Windows.Forms.TextRenderer.DrawText(Graphics, string, Rectangle, Color, TextFormaFlags) I prepare my image (which is a png) by loading it in memory, with something similar to
Image image = ImageCache.Get(...); bitmap = new Bitmap(image); graphic = Graphics.FromImage(bitmap); I then draw my text with the above command. The problem is that whatever I use for the color, even something like
System.Drawing.Color.FromArgb(0,255,255,255) the transparency is not drawn. I tried many settings for
graphics.TextRenderingHint and different combinations of fonts, transparency level, etc. Is there something I don't understand here? Any hint is appreciated.
Thank you.
Color.TransparentasBackColoror useGraphics.DrawString. See: TextRenderer.DrawText in Bitmap vs OnPaintBackground