The ResizeImage method takes in the target (width) of the image and attempts to calculate the height based on the ratio. There is a chance, however, that that the target height exceeds the bounds of MaxImageDimension which is currently set at 4096.
We should either:
- return an error if this should happen
- calculate the largest possible integer width to result in a height closest to 4096px.