mattal999 Posted December 9, 2008 Share Posted December 9, 2008 Hi, I have this script: <?php header("Content-type: image/png"); $image = imagecreate(50, 100); $src = imagecreatefrompng("http://www.ibuziness.co.uk/modules/avatars/avatar.php?ownerid=".$_GET['ownerid']); $background = imagecolorallocate($image, 0, 0, 0); imagecolortransparent($image, $background); imagealphablending($image, false); imagesavealpha($image, true); imagecopyresized($image, $src, 0, 0, 0, 0, 50, 100, 150, 300); //imagecopyresampled($image, $src, 0, 0, 0, 0, 50, 100, 150, 300); imagepng($image); imagedestroy($image); ?> which uses this image: to produce: As you can see, the image is very pixelated. I have tried both imagecopyresampled and imagecopyresized, but they produce the same result. imagecreatetruecolor produces an even worse result than imagecreate. Is there any solution? Link to comment https://forums.phpfreaks.com/topic/136225-resizing-pngs/ Share on other sites More sharing options...
mattal999 Posted December 9, 2008 Author Share Posted December 9, 2008 Bump. Link to comment https://forums.phpfreaks.com/topic/136225-resizing-pngs/#findComment-710656 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.