Jump to content

jeppelange

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jeppelange's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Try this: [code] <?php function makethumb($path,$newwidth,$newpath) {     $orgpicture = imagecreatefromjpeg($path);     $orgwidth = imagesx($orgpicture); //finds the width of original pix     $orgheight = imagesy($orgpicture); //and height     $ratio = $orgheight / $orgwidth; //ratio     $thumbwidth = $newwidth; //set width     $thumbheight = $thumbwidth * $ratio; //create height     $thumb = imagecreatetruecolor($thumbwidth, $thumbheight); //create image there the thumb will be located     imagecopyresampled($thumb, $orgpicture, 0, 0, 0, 0, $thumbwidth, $thumbheight, $orgwidth, $orgheight); //copy the old pix, resize, and drop it in the image we just made     imagejpeg($thumb, $newpath, 100); //save thumb with max quality (100); } makethumb('the/org/path/pix.jpg',100,'the/new/path/pix.jpg'); makethumb('the/org/path/pix.jpg',200,'the/other/new/path/pix.jpg'); ?>[/code] Not testet... I don't understand the Q about MySQL, but you should be able to figure that out from here, otherwise try again! [img src=\"style_emoticons/[#EMO_DIR#]/wink.gif\" style=\"vertical-align:middle\" emoid=\":wink:\" border=\"0\" alt=\"wink.gif\" /] -OVA-
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.