Im making a php gallery for a site im workin on www.paruch.com/modeling
my auto thumber resizes the pics right now to height 120 by width 160, but i would like to make the height Proportioned to the width.. can anyone help me out here? this is how i am currently doing it
/////////////////////////////////////////////////////////////////////
// Get image specs //
/////////////////////////////////////////////////////////////////////
$size = GetImageSize($picture);
$oldwidth = $size[0];
$oldheight = $size[1];
/////////////////////////////////////////////////////////////////////
// Create the large thumbnail //
/////////////////////////////////////////////////////////////////////
// Set the image specs you want! //
/////////////////////////////////////////////////////////////////////
$newheight = 120;
$newwidth = 160;
$newthumb = imagecreatetruecolor($newwidth, $newheight);
imagecopyresized($newthumb, $oldimg, 0 , 0 , 0 , 0 , ($newwidth), ($newheight), $oldwidth, $oldheight);
my auto thumber resizes the pics right now to height 120 by width 160, but i would like to make the height Proportioned to the width.. can anyone help me out here? this is how i am currently doing it
/////////////////////////////////////////////////////////////////////
// Get image specs //
/////////////////////////////////////////////////////////////////////
$size = GetImageSize($picture);
$oldwidth = $size[0];
$oldheight = $size[1];
/////////////////////////////////////////////////////////////////////
// Create the large thumbnail //
/////////////////////////////////////////////////////////////////////
// Set the image specs you want! //
/////////////////////////////////////////////////////////////////////
$newheight = 120;
$newwidth = 160;
$newthumb = imagecreatetruecolor($newwidth, $newheight);
imagecopyresized($newthumb, $oldimg, 0 , 0 , 0 , 0 , ($newwidth), ($newheight), $oldwidth, $oldheight);















