View Single Post
Old 10-11-2012, 04:29 PM   PM User | #2
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,363
Thanks: 18
Thanked 347 Times in 346 Posts
sunfighter is on a distinguished road
This line
Code:
$new_height = $thumbWidth;#floor( $height * ( $thumbWidth / $width ) );
sets your height to equal your width, but if you remove $thumbWidth; of $new_height = $thumbWidth; and replace it with the section that's commented out
Code:
floor( $height * ( $thumbWidth / $width ) );
You should get what you want.

You might have to change the dimensions of the displayed thumb nail to make it square and uniform again.
sunfighter is online now   Reply With Quote