Fix bugs related to alternative-resolutions and cropping

If the crop parameter is set with pixels we need to scale them according
to the resolution

Cherry-picked fc427368 by @relekang