If you want to compress the images you'll need to use a format that supports variable compression like jpg does, so regardless of the image type uploaded you'll need to save it as a jpg. If you want to ensure the image is below a certain size you'll probably have to set the compression level at a certain rate and see if the image is small enough then re-do at a different compression rate until it is below your size threshold.
How to: Set JPEG Compression Level
PNG also supports variable compression so you could try that format if you prefer.
Also as a general tip, if you're going to post your code don't use "var" everywhere. It's bad practice to use it anyway, but at least when using visual studio you can hover over the declarations to discover their types but we don't know what type any of your objects are and that can make problems harder to diagnose.