troubleshooting Question

Resizing image, need algo

Avatar of matthew016
matthew016Flag for Belgium asked on
16 Comments3 Solutions309 ViewsLast Modified:

I need to resize an image as a thumbnail.
I need to compute the correct dimensions by keeping the ratio.

The params are :
old_x, old_y (the current dimensions of the image),
new_w (the width of the thumbnail), new_y (the height of the thumbnail)

The new values must be assigned in thumb_w and thumb_h

Thank you.
Join our community to see this answer!
Unlock 3 Answers and 16 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 16 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros