oseawey / timthumb

Automatically exported from code.google.com/p/timthumb
0 stars 0 forks source link

Delivering non-distorted thumbnails #146

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. have an image that is ordinarily 200px wide and 400px tall
2. apply timThumb to create my basic thumbnail to 100px x 100px
3. zet zoomcrop to 0 as I dont want to zoom

What is the expected output? What do you see instead?
I expect my graphic to be reduced in size with no distortion.
It should be reduced vertically only since that is the large parameter.  In 
this case the width should wind up at 50px.   But what happens is the width is 
then stretched to 100px, creating a distorted image.

What version of the product are you using? On what operating system?
1.19   LAMP Server

I have an image that is ordinarily 200px wide and 400px tall.  I apply timThumb 
to create my basic thumbnail to 100px x 100px.  Now my image is distorted and 
looks FAT as now the image has been stretched to fit the 100 x 100 dimensions.

The code needs to detect if it is a wide image or a tall image and then reduce 
the size on the wide or tall parameter only - that will keep it from distorting 
right?

Original issue reported on code.google.com by thocutt1...@gmail.com on 10 Jan 2011 at 11:19

GoogleCodeExporter commented 9 years ago
Hi - try different zoom crop values. More info here: 
http://www.binarymoon.co.uk/2011/03/timthumb-proportional-scaling-security-impro
vements/

Original comment by BinaryMoon on 4 Apr 2011 at 7:56