only allow to upload profile pictures of a certain size I want to limit the user to only upload profile pictures of 160x160 size. What is the simplest way to validate that the resolution of uploaded avatar picture is actually 160x160, and provide an error message if it's not?
You need to form alter user_account_form().  Remove user_validate_picture() as the validator.  Duplicate that function into your own module, and add as a validator.  Inside that, update the size line to be:

'file_validate_image_resolution' =&gt; array('160x160', '160x160'),


This should enforce the same value for both minimum and maximum size before the file gets saved off.  I don't think you can add a second validator; I think the size check needs to be done in one step.