Hello I have problem with my resizing and uploading img to server. Everything was ok, but today tell me friend when he want add img to server, he gets "A generic error occurred in GDI+.".. But in my PC all works fine. So can be problem with IIS? (Two days ago he had some problem so admin change something on server).
Bitmap image = KTEditImage.ResizeImage(new Bitmap(file.PostedFile.InputStream), 360, 360);
image.Save(Server.MapPath("~") + "/Static/Img/Zbozi/" + urlName, ImageFormat.Jpeg);
image.Dispose();
Bitmap smallImage = KTEditImage.ResizeImage(new Bitmap(file.PostedFile.InputStream), 230, 230);
smallImage.Save(Server.MapPath("~") + "/Static/Img/Zbozi/Small/" + urlName, ImageFormat.Jpeg);
smallImage.Dispose();
and resize method is
public static Bitmap ResizeImage(Bitmap image, int maxWidth, int maxHeight)
{
return new Bitmap(image, maxWidth, maxHeight);
}