Re: bad quality with imagecopyresampled [PHP4]
| From: | Tom Rogers | Date: | Tue, 21 Oct 2003 23:44:57 +0000 |
| Subject: | Re: bad quality with imagecopyresampled [PHP4] | ||
| References: | 1 | Groups: | php.general php.smarty.general |
| Request: | Send a blank email to php-general+get-167026@lists.php.net to get a copy of this message | ||
Hi,
Wednesday, October 22, 2003, 9:15:38 AM, you wrote:
T> imagecopyresampled makes bad quality jpeg images when scaling them down,
T> especially on areas of the same colour (i.e. large font).
T> I am using antialiasing.
T> I thought I'd try converting the images to png - imagecopyresampling them -
T> and then save as jpeg, however I can't seem to get it to work!
T> Here's some of the code I'm using:
T> /////////////////////////////////////////////////////
T> imagecreatefromjpeg($src);
T> // add convert here
T> imagecopyresampled($destImage, $srcImage, 0, 0, 0,
T> 0,$destSize[0],$destSize[1],$srcSize[0],$srcSize[1]);
T> imagejpeg($destImage,$dest,$quality);
T> /////////////////////////////////////////////////////
T> How can I convert the jpeg to png temporarily before imagecopyresample?
T> Please help!
Make sure you use ImageCreateTrueColor() for the second image.
--
regards,
Tom