Mondeo
Centurion
I have this code that Mr Paul kindly helped me with a while ago
What i'm trying to do is take newImg as use it in an asp.net image control. Can't seem to get it to work
Image1 = newImg
Value of type 'system.drawing.bitmap' cannot be converted to 'system.web.ui.webcontrols.image'
Is there a way to do it without saving the new image to disk first?
Thanks
Visual Basic:
'Imports
Imports System.Drawing
Imports System.Drawing.Imaging
'Code
Dim oldImg As Image
Dim newImg As Bitmap
'Load original image
oldImg = Image.FromFile(fileName)
'Create new image at new size
newImg = New Bitmap(oldImg, 200, 150)
'Save
newImg.Save(newFileName, ImageFormat.Jpeg)
Image1 = newImg
Value of type 'system.drawing.bitmap' cannot be converted to 'system.web.ui.webcontrols.image'
Is there a way to do it without saving the new image to disk first?
Thanks
Last edited by a moderator: