You can really use any moethod you see fit to resize the images. A good idea woul be to write a global event to hook in to media library filed being created that can perform all of the resizing that you need. Something like
MediaFileInfo.TYPEINFO.Events.Insert.After += Insert_After should see you right. Typically, the solution I've used in the past is to o the image optimization and resizing via a custom HTTP handler, so that you only upload the high-resolution images. We usually have a CDN in place and also apply static file caching where required to reduce the server load.
I've not use 51Degrees for this. As far as I am aware the Kentico implementation focuses on device detection only, so you would either need to look at services like those that you mention or roll your own.