I have a script that takes photo size jpg's and displays them as thumbnails. the Thumbnails are in PNG format (altho the problem occurs if I use JPG too).
When its resized the image, the colours in the image are washed out and so the thumbnail is bearly recognizable.
Is there something that I can do to get the colours from the JPG stay in the picture once it has been resized?
the PHP code looks like this:
$new_w = ($img_width/4)-9;
$new_h = ($img_height/4) - 6;
header("Content-type: image/PNG");
$dst_img=ImageCreate($new_w,$new_h);
$src_img=ImageCreateFromJpeg("$img_name");
ImageCopyResized($dst_img,$src_img,0,0,0,0,$new_w,$new_h,ImageSX($src_img),ImageSY($src_img));
ImagePNG($dst_img);