api and algorithm changes for arbitrary size, better gravatar mimic