Formula for resizing images:

where is the original height in pixels and is the original width in pixels. Round off to the nearest whole pixel.

Things I would say in userboxes, only I can't be bothered to make userboxes.