I am using the following functions in a script to reduce weight of JPEG images uploaded to a web site:
$img1=imageCreateFromJpeg($ffile);
$img2 = imageCreate($x2,$y2);
imageCopyResized($img2,$img1,0,0,0,0,$x2,$y2,$x1,$y1);
imageJPEG($img2,"$ffolder/$ffname",$qual);
imageDestroy($img1);
imageDestroy($img2);
As a result I obtain a quite reasonable reduction in weight of the image, but my problem is that the images become quite colorless and grayish. Is there some way to correct this?
thanks...
roberto