|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-05-05 07:57 UTC] ab at berg dot net
Hello, when I use the function imagecopyresized with the PHP Version 4.3.1 or 4.3.2RC2 the new Image has a very bad quality. If use the PGP Version 4.2.3 it works very fast and with good quality. For example: Original Image: http://www.andreas.boehm.de/1/ori.JPG Image with 4.2.3: http://www.andreas.boehm.de/1/good.jpg Image with 4.3.x: http://www.andreas.boehm.de/1/bad.jpg I have install the GD-Lib 1.8.4-9 and my configure command for the version 4.2.3 and 4.3.x is: './configure' '--with-mysql' '--with-gd' '--with-apxs' '--with-jpeg-dir' '--with-png-dir' '--with-zlib-dir' '--enable-track-vars=yes' '--enable-url-includes=yes' '--with-tiff-dir' '--with-pdflib' '--enable-shared-pdflib' '--with-ttf' '--with-imap' '--with-kerberos' '--with-imap-ssl' '--with-gettext' '--enable-ftp' Please help me - Thank you Andreas PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 15:00:01 2025 UTC |
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 AndreasHi Sniper, i use the 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"); } And this are the example Images: Original Image: http://www.andreas.boehm.de/1/ori.JPG Image with 4.2.3: http://www.andreas.boehm.de/1/good.jpg Image with 4.3.x: http://www.andreas.boehm.de/1/bad.jpg Andreas