Image rotate almost working
Found this script online, sort of helps me with my issue but ran into a wall.
Here is the code
And the error:
public partial class _Default : System.Web.UI.Page
protected void Button1_Click(object sender, EventArgs e)
//get the path to the image
string path = Server.MapPath(Image1.ImageUrl);
//create an image object from the image in that path
System.Drawing.Image img = System.Drawing.Image.FromFile(path);
//rotate the image
//save the image out to the file
//release image file
And yeah the "path" string is correct and points to the original file.
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+.
Line 22: //save the image out to the file
Line 23: img.Save(path);
Line 25: //release image file