Accurax Posted February 26, 2007 Share Posted February 26, 2007 I think this may be down to my lack of semantic knowledge. It uploads an image of the correct size, to the correct directory..... problem is its just a vlack square that it creates.... i cant get it to actually put the origional into it. From looking at the code i cant honestly understand why this doesnt work... please can somebody take the time to glance at this for me? <?php $image = imagecreatefromjpeg("../../member_pics/full_size/".$new_filename); if ($image === false) { die ('Unable to open image'); } $width = imagesx($image); $height = imagesy($image); // New width and height $new_hieght = "100px"; $new_width = "100px"; // Resample $image_resized = imagecreatetruecolor($new_hieght, $new_width); imagecopyresampled($image_resized, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height); $save = "../../member_pics/thumbnails/".$thmb_filename; imagejpeg($image_resized, $save, 100); imagedestroy($image); imagedestroy($image_resized); ?> Id really appreciate someone taking a few mins to look at this for me. Thanks guys Accura Link to comment https://forums.phpfreaks.com/topic/40212-final-thumbnail-problem-nearly-got-it/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.