I have creating PHP application which takes images with any height and width. It creates 2 different images as follows,
1: thumbnail image (small image) with size 130x130
2: preview image (big image) with 600x400.
How can we decide the height and width of thumbnail & preview image from the height and width of input image?
I have few images with sizes 100x1600, 1024x1024, 316x360.
If i decrease/increase the size of input image most of the time, either any image is streched or compact.
What is the way to find the desired height and width so that thumbnail & preview image looks good?