A .jpeg file is just a bag of bytes without a JPEG decoder. There is one built-in Bitmap class, it perfectly decodes .jpeg files. The result is a Bitmap object, you cannot get around this.
And it supports resizing through the Graphics class, as well as the Bitmap (Image, Size) constructor. But yes, when reducing the size of the .jpeg image, a larger file is often created. This is an unavoidable side effect of the Graphics.Interpolation mode. He tries to improve the appearance of the thumbnail by running pixels through a filter. The bicubic filter does an excellent job of this.
It looks great for the human eye, doesn't look so great for a JPEG encoder. The filter creates interpolated pixel colors, designed to prevent the complete disappearance of image details while reducing the size. However, these mixed pixel values make image compression difficult, thereby creating a larger file.
You can play with Graphics.InterpolationMode and choose a lower quality filter. Creates a poorer image, but is easier to compress. I doubt that you will appreciate the result.
source share