Re: Image resizing...

From: Date: Mon, 03 Oct 2005 16:35:37 +0000
Subject: Re: Image resizing...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-223568@lists.php.net to get a copy of this message
Sonia wrote:
Hi All I've been working on finishing a project SGML2IMAGE and I am sort of having trouble with resizing of images. I am trying to just use the GD library so when I distro the package it will not need any other things installed to be used. Now I am using... imagecreatetruecolor (); imagecreatefrom___ (); imagecopyresampled (); image___ (); But the thumbnails look blurry for any image less than 50% of the original image created by the PHP SGML parser. So my question seeing I am not very good with the GD library. Am I using the best functions to do the resize or should I be using some other image function(s) that may give better results! To give you a idea of what I am doing see the demo running on my note book.... http://24.218.192.217/capture.php Thanks.... sonia Here is the method I use:
           $destimg=imagecreatetruecolor($aspect_w, $aspect_h);
           $srcimg=imagecreatefromjpeg($path.$files[$i]);
           imageantialias($destimg,true);
           imagecopyresized($destimg,$srcimg,0,0,0,0,$aspect_w,$aspect_h,ImageSX($srcimg),ImageSY($srcimg));
           imagejpeg($destimg,$dest_dir.$image_name);
imageantialias() might do some good in your case. HTH! Matt Darby

« previous php.general (#223568) next »