Last post Jul 24, 2006 11:46 AM by nevets2001uk2
Jul 24, 2006 11:46 AM|nevets2001uk2|LINK
I have some code as follows to dynamically frame and copyright caption an image
Dim framed As System.Drawing.Image = New Bitmap(filename)
Dim newpicture As New Bitmap(framed.Width + 20, framed.Height + 20)
Dim objGraphics As System.Drawing.Graphics
objGraphics = Graphics.FromImage(newpicture)
objGraphics.FillRectangle(New SolidBrush(Color.Black), 0, 0, newpicture.Width, newpicture.Height)
objGraphics.FillRectangle(New SolidBrush(Color.White), 5, 5, newpicture.Width - 10, newpicture.Height - 10)
objGraphics.DrawImage(framed, 10, 10, framed.Width, framed.Height)
objGraphics.DrawString("Copyright © 2006", New Font("Arial", 18, FontStyle.Bold, GraphicsUnit.Pixel), Brushes.Gray, 10, 10)
framed = Nothing
What I'd like to do is add some kind of soft dark outline, kind of like a centered dropshadow, around the text so that it stands out on lighter coloured images. I was thinking I could perhaps have a black version of the text behind the white version and
then blur it somehow, but not sure if that's possible.
Are there any simple ways to do this sort of thing?