We run on a Windows platform.  If a client uploads an image to my script
that is too wide, I want to use GD to resize the image down to the proper
dimensions.

The problem I'm having is that the resized image drops huge chunks of the
color pallette, creating what is basically a monochromatic image.

Is there any way around this?  Am I doing something wrong?  I'm not very
familiar at all with the graphics part of things, so I'm hoping there's
something glarinly obvious that I'm missing.

The code follows.

                        $src_img =
ImageCreateFromJpeg("../images/property/property_".$id."tmp.jpg");

                        #[...]

                        $dst_img = ImageCreate ($new_w,$new_h);


ImageCopyResampled($dst_img,$src_img,0,0,0,0,$new_w,$new_h,ImageSX($src_img)
,ImageSY($src_img));

                        ImageJpeg($dst_img,"../images/property/property_".$id.".jpeg");



Michael Hall
Web Development Manager / Sr. Programmer
Prairie Fire Internet Technologies
[EMAIL PROTECTED]
605.357.9700 ext. 14


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to