Image Downsizer

Let’s say you have images that you wish to load into your application. However, instead of having the user downscale or downsize those images first, your application could do it for them.

Below is a piece of code I wrote in C# that will do just that by brute forcing. Admittedly, it’s not the best solution. An AI probably could do it better but in many cases, the following works pretty well.