[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-users] GD LIBRARIES PHP SCRIPTS COLORS FAILS
- Subject: [cobalt-users] GD LIBRARIES PHP SCRIPTS COLORS FAILS
- From: "Alex Busquets" <alex@xxxxxxxxxxxxxxxxx>
- Date: Sat Jan 18 06:16:02 2003
- List-id: Mailing list for users to share thoughts on Sun Cobalt products. <cobalt-users.list.cobalt.com>
Last days some people has posted some problems with php and gd libraries on
raq550, i have this problem.
Also I have the last version of libjpeg and libjpeg-devel
That is a solution for manipulate images with php and not have problems with
colors.
$quality=70;
$src_img = ImageCreateFromJPEG($newfile0);
$dst_img = imagecreatetruecolor($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,"$newfile1", $quality);
ImageDestroy($dst_img);
Alex