Results 1 to 15 of 15
Thread: imagecopyresampled issue
Apr 17, 2007, 07:03 #1
- Join Date
- Feb 2006
- 0 Post(s)
- 0 Thread(s)
I've made function that resizes a given image, but when I change imagecopyresized with imagecopyresampled I'm encountering some problems.
In Firefox I get a download prompt for the php file I'm running. In IE it says I can't display the page.
I use the folowing code:
// create a new image-resource
$thumb = imagecreatetruecolor($new_width, $new_height);
$new_source = imagecreatefromjpeg($source);
// Creates the thumbnail
imagecopyresampled($thumb, $new_source, 0, 0, 0, 0, $new_width, $new_height, $img_width, $img_height);
imagejpeg($thumb, $target, 100);
Last edited by lix0r; Apr 17, 2007 at 09:26.