#23491 [Opn->Fbk]: Very bad Quality when I use imagecopyresized

From: Date: Mon, 05 May 2003 21:39:07 +0000
Subject: #23491 [Opn->Fbk]: Very bad Quality when I use imagecopyresized
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-39109@lists.php.net to get a copy of this message
ID: 23491 Updated by: sniper@php.net Reported By: ab at berg dot net -Status: Open +Status: Feedback Bug Type: GD related Operating System: RedHat Linux 7.0 with gd-1.8.4-9 PHP Version: 4.3.2RC2 New Comment: Please provide a complete example script which actually produces the result you show here. Previous Comments: ------------------------------------------------------------------------ [2003-05-05 09:36:36] ab at berg dot net Hi Rasmus, really? Why works the thumbnail function with php 4.2.3 and gd 1.8.x perfectly with more than 256 colours and with php 4.3.x not? How can I compile the GD2 bundled? What must I change in my configure command? Thanks a lot Andreas ------------------------------------------------------------------------ [2003-05-05 09:26:57] rasmus@php.net Actually, never mind, just took a look at your images. I assume you were also using gd-1.8 with PHP 4.2.3? ------------------------------------------------------------------------ [2003-05-05 09:22:50] rasmus@php.net gd-1.x only supports 256 colours. You should be using the bundled version of gd2 and then ImageCreateTrueColor() instead of ImageCreate() in your code. Then the thumbnail would look nice. ------------------------------------------------------------------------ [2003-05-05 08:51:07] ab at berg dot net Hi Derick, here my thumbnail-function: function imgthumb($ori,$thump,$thumbQuality,$thumbWidth) { $origImageHandle = ImageCreateFromJPEG($ori); $imageWidth = imagesx($origImageHandle); $imageHeigth = imagesy($origImageHandle); $thumbHeigth = floor($thumbWidth * $imageHeigth / $imageWidth); $thumbImageHandle = ImageCreate("$thumbWidth","$thumbHeigth"); imagecopyresized($thumbImageHandle,$origImageHandle,0,0,0,0,$thumbWidth,$thumbHeigth,imagesx($origImageHandle),imagesy($origImageHandle)); imagejpeg($thumbImageHandle,$thump,"$thumbQuality"); } Thx for your fast answer Andreas ------------------------------------------------------------------------ [2003-05-05 08:11:15] derick@php.net Post a link to your code please. Derick ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/23491 -- Edit this bug report at http://bugs.php.net/?id=23491&edit=1

« previous php.bugs (#39109) next »