I have an area to display an image that has a max size of 240×180
If I have an image of 400×423 how can I calculate a new width and height for that image that best fits into my 240×180 box? (In this case it would be 170×180)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
there are probably some image libraries that do this well, but the math is pretty simple.