Last post Feb 28, 2008 03:35 AM by Zhao Ji Ma - MSFT
Feb 26, 2008 07:05 PM|grogo21|LINK
Hello, I need help placing a watermark on an image after it has been thumbnailed. Here is my code:
Dim oImage As System.Drawing.Image
Dim oThumbnail As System.Drawing.Image
oImage = oImage.FromFile(toFileName)
oThumbnail = oImage.GetThumbnailImage(.......)
'create watermark on thumbnail image
Dim bmp As Bitmap = New Bitmap(oThumbnail)
Dim canvas As Graphics = Graphics.FromImage(bmp)
'continue to create watermark
I get an error on: Dim bmp As Bitmap = New Bitmap(oThumbnail)
Error Says Parameter is not valid.
How can I fix this? Thanks!!
Feb 27, 2008 02:39 AM|siva_sm|LINK
Feb 28, 2008 12:15 AM|grogo21|LINK
Yes, i was displaying the images on the page before, I am just tring to add the ability to watermark them before I display them now.
Feb 28, 2008 03:35 AM|Zhao Ji Ma - MSFT|LINK
This could happen if the image of input parameter is not in the same format, you may need to use the
ImageConverter Class to convert it first: