View Single Post
  #9  
Old 09-09-2010, 07:55 PM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,922

Try this...

Right Before line 318, before this line:
PHP Code:
    imagecopyresized($imgresized$imgsoruce0000$thumb_width$thumb_height$imgdata[0], $imgdata[1]); 
Try adding this:

PHP Code:
        $x=$imgdata[0]/$thumb_width;
        
$y=$imgdata[1]/$thumb_height;
        
        If(
$y $x){
            
$thumb_width=round($imgdata[0] * ($y));
            
$thumb_height=round($imgdata[1] * ($y));
        } Else {
            
$thumb_width=round($imgdata[0] * ($x));
            
$thumb_height=round($imgdata[1] * ($x));
        } 
This is untested... Let me know if it works.
__________________

04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq
Reply With Quote