Hi I am using ImageSharp version 1.0.0-alpha9-00175. When i use the
.Save(output, ImageFormats.Jpeg);
Here is my code
input.Seek(0, SeekOrigin.Begin);
using (Image<Rgba32> image = Image.Load<Rgba32>(input))
{
if (image.Width >= image.Height) //landscape
{
ratio = image.Height / defaultWidth;
}
else //portrait
{
ratio = image.Width / defaultHeight;
}
image.Resize(image.Width / ratio, image.Height / ratio)
.Crop(defaultWidth, defaultHeight)
.Save(output, ImageFormats.Jpeg);
}
If i comment out the .Save line the code runs without exception but obviously wont save. I have looked on stackoverflow and the issues on Github but to no avail.
Can anyone see something i can't?