|
Posted by Matt Darby on 10/16/37 11:28
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
Navigation:
[Reply to this message]
|