> I'm simply trying to resize an image, which is working - sortof. It
resizes
> properly, but it loses it's color. Why, and how do I correct it? Thanks.
>
> <?
> $pic_dir = "_uimages";
> $picture = "$pic_dir/mypic.jpg";
> $size = GetImageSize($picture);
> $width = round($size[0]/4);
> $height = round($size[1]/4);
> $im = ImageCreate($width,$height);
> $im_o = ImageCreateFromJPEG($picture);;
> ImageCopyResized($im,$im_o,0,0,0,0,$width,$height,$size[0],$size[1]);
> imagedestroy($im_o);
> ImageJPEG($im);
> imagedestroy($im);
> ?>
Your $im does not have the same pallette of colors as the original...
You'll need to copy over the pallette first somehow.
--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
--
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]