Alguém saberia dizer o que tem de errado com este código ?
Tentei várias coisas mas não consegui descobrir o erro..
Pensei que pudesse ser os imports :
Imports System.IO
Imports System.Drawing
Imports System.Drawing.Image
Imports System.Drawing.Drawing2D
Mas não sei..
=====================================================================
Server Error in '/' Application.
--------------------------------------------------------------------------------
A generic error occurred in GDI+.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.
Source Error:
Line 20: Img = Image.FromStream(FileUpload1.PostedFile.InputStream)
Line 21: Img = Redimensiona(Img, 1000, 270)
Line 22: Img.Save(Request.MapPath("~/images/produtos/img/") + Request.QueryString("Id") + ".jpeg", Imaging.ImageFormat.Jpeg)
Line 23: Img = Redimensiona(Img, 60, 60)
Line 24: Img.Save(Request.MapPath("~/images/produtos/tbn/") + Request.QueryString("Id") + ".jpeg", Imaging.ImageFormat.Jpeg)
=====================================================================