Scales the size of an image to the given dimensions. The other parameter
   will be calculated if 0 is passed as either param.