I have an image with width 4096 and height 2896. I would like to scale the image to below 4000 pixels wide - and as close to 4000 as possible. I would also like to keep the dimensions whole numbers.
Is there an equation to do this?
Thanks
More Details
Clarification: I do not care if I divide by a rational number.
Reason: I am doing this due to a software limitation. The software that we make the image with can not have a width or height 4000px or more. But the size I want is 4096. To try and make the final image as crisp as possible, I reasoned that you should not have any rounding.