NYCPHP Meetup

NYPHP.org

[nycphp-talk] image resizing quality loss

Peter Sawczynec psaw at pswebcode.com
Wed May 4 11:17:53 EDT 2005


I have worked on several projects now where I have used gd 1.x, gd 2.x and
ImageMagick 6.x

My casual observations have been:
gd 1.x to be poorer.
gd 2.x to much better in quality.
And, ImageMagick 6.x to be real good and faster.

Peter

-----Original Message-----
From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On
Behalf Of Rahmin Pavlovic
Sent: Wednesday, May 04, 2005 9:27 AM
To: NYPHP Talk
Subject: [nycphp-talk] image resizing quality loss


I'm building a tool to resize large jpegs down to two smaller versions. 
  The resized images look over-sharpened, with jaggedy-edges.  I can't 
tell if this is a result of how I'm doing it or if it's something else. 
  Here's basically what I'm doing:

$image_file=@imagecreatefromjpeg('temp.jpg');
$new_image=imagecreate($new_width,$new_height);
$new_image_name=$naming_convention.'.jpg';
imagecopyresized($new_image,$image_file,0,0,0,0,$new_width,$new_height,$imag
e_size[0],$image_size[1]);
imagejpeg($new_image,$new_image_name,100);

Even tho I have the jpeg quality set to 100, the new images look way 
brighter, sharper and more pixelated, detracting from the quality.  Does 
anyone know if/how I can tweak this behavior?
_______________________________________________
New York PHP Talk Mailing List
AMP Technology
Supporting Apache, MySQL and PHP
http://lists.nyphp.org/mailman/listinfo/talk
http://www.nyphp.org





More information about the talk mailing list