I am trying to resize and then collect square images. I have an image in ReadOnlyStream and you want to output to a MemoryStream .
I am using ImageResizer for this.
I would like my images to first be reduced in size and then centered. I use this code, but it does not create what I need. He produces nothing ...
var resultStream = new MemoryStream(); ImageJob job = new ImageJob(imageStream, resultStream, new Instructions { Width = 100, Height = 100, Mode = FitMode.Crop }); job.Build();
This code should reduce the size of large images and crop them based on the default values โโin the library (center crop).
I did not provide any specific configuration in web.config because, as far as I understand, this is not required.
What am I doing wrong?
source share