that is easy to do image compression if an imaging sdk which contains such function is employed to do so. there are many such sdks on the internet and i think you can download one and have a try, good luck.
rasteredge.com/dotnet-imaging/image-compression