Jump to content

Final Thumbnail Problem .... Nearly got it


Accurax

Recommended Posts

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.