Hello, I am trying to write a script that will make a thumb from a image. I have been having trouble getting GD code to work. So what I have done now, is I made a copy of the file with php, and renamed is _thumb. Now all I need todo is change the dimensions. To 40X40. What shoudl I do? I can't seem to make GD work, any other suggestions?
$start = "/home/graphics/public_html/templates/thumbs/$newfilename";
$output = '/home/graphics/public_html/templates/thumbs/' . $title . '_'. md5(microtime() . $HTTP_SERVER_VARS['REMOTE_ADDR']) . '_thumb.' . $ext;
if (!copy($start, $output)){
echo "There was a problem while trying to upload your image.";
exit;
}
As you can see, I have a thumb file created, I just need to down size it to be 40 X 40.