I use the below code to resize JPG files to 200x240 pixels. The attached example file has a size of 900x600 pixels and is only 84 kb. However when I save the resized file using ImageSharp, the produced image is 435 kb! Why is the smaller image has a bigger file size?
I noticed that the bit depth of the original image is 24 bits but ImageSharp stores it with 32 bits. How can I reduce this?
Resized image:
var thumbImage = image.Clone(x => x.GetCurrentSize());
if (thumbImage.Width > 200)
{
thumbImage.Mutate(m =>
{
m.Resize(new ResizeOptions
{
Mode = ResizeMode.Min,
Size = new Size(200, 0)
});
});