pouncer Posted April 28, 2007 Share Posted April 28, 2007 http://www.interzurf.com/socialnetwork/collection_items/John_images/godfather1.jpg that displays the image, now when i try to display a thumbnail: http://www.interzurf.com/socialnetwork/thumbnail.php?im=collection_items/John_images/godfather1.jpg you can see the errors, here's the thumbnail script <?php // e.g; thumbnail.php?im=path/imagename.jpg Header("Content-type: image/jpeg"); // The $orig_image returns an image identifier representing the image obtained from the given filename. $orig_image = imagecreatefromjpeg($im); // Get the size of the image and store it in the list array variables. // getimagesize() returns an array with these elements; width/height/image type/attirbutes list($width, $height, $type, $attr) = getimagesize($im); // Apply the shrink calculation. $Numb = 100; // Adjust the height if the current images width is more than 100. if ($width > $Numb) { $newheight = ($Numb / $width) * $height; } else $newheight = $height; // Create a new true color image based on the above sizes. $blank_image = imagecreatetruecolor($Numb, $newheight); // Copy and resize the old image with resampling imagecopyresampled($blank_image, $orig_image, 0,0,0,0, $Numb, $newheight, imagesx($orig_image), imagesy($orig_image)); // Create a new JPG image and output it to the browser. imagejpeg($blank_image); // Destroy the variables as we don't need them after the image has been outputten. imagedestroy($blank_image); imagedestroy($orig_image); ?> Can someone please help me out? Link to comment https://forums.phpfreaks.com/topic/49078-thumbnail-script-errors-expert-help-needed/ Share on other sites More sharing options...
fanfavorite Posted April 28, 2007 Share Posted April 28, 2007 Seems to be working when I click the thumbnail link. Link to comment https://forums.phpfreaks.com/topic/49078-thumbnail-script-errors-expert-help-needed/#findComment-240467 Share on other sites More sharing options...
taith Posted April 28, 2007 Share Posted April 28, 2007 same here... works perfectly... Link to comment https://forums.phpfreaks.com/topic/49078-thumbnail-script-errors-expert-help-needed/#findComment-240468 Share on other sites More sharing options...
pouncer Posted April 28, 2007 Author Share Posted April 28, 2007 Thanks guys, at the time i posted, it was not working because the guy set the server settings to php5 he's now changed it back to php4 for me, so it now works. i thought it might have been my code Link to comment https://forums.phpfreaks.com/topic/49078-thumbnail-script-errors-expert-help-needed/#findComment-240485 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.