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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.