Torna al Thread
public static void CropImageStreaming(Stream imgStr, int Width, int Height, string filename)
{
//creo il bitmap dallo stream
System.Drawing.Image bmpStream = System.Drawing.Image.FromStream(imgStr);
System.Drawing.Image imgPhoto = CropStreaming(bmpStream, Width, Height, AnchorPosition.Center);
try
{
imgPhoto.Save(filename, ImageFormat.Jpeg); //ERRORE GDI+
imgPhoto.Dispose();
}
catch
{}
}