I believe you are not implementing the correct algorithm. First you will need to make the picture square and then resize it to the target pixel size. Otherwise the image will appear pixeled and with bad quality as I have checked with Facebook Contacts.