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:
If I change it back to imagecopyresized it works just fine. Anyone have any idea why this happens?
// 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);