[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] GD LIBRARIES PHP SCRIPTS COLORS FAILS



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