note 32818 added to function.imagecreatetruecolor
| From: | bjorntje at hotmail dot com | Date: | Sun, 08 Jun 2003 03:41:39 +0000 |
| Subject: | note 32818 added to function.imagecreatetruecolor | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-49962@lists.php.net to get a copy of this message | ||
I just fiddled around with Phpix, which had some problems using the GD lib
(washed out colours).
I changed the lines, which did the trick.
Just in case some of you are still having problems and
you can't change the PHP-install
on the hosting side:
$im = ImageCreateFromJPEG($source);
$new_im = ImageCreate($new_width,$new_height);
ImageCopyResized($new_im,$im,0,0,0,0,
$new_width,$new_height,ImageSX($im),ImageSY($im));
TO
$im = ImageCreateTrueColorFromJPEG($source);
$new_im = ImageCreateTrueColor($new_width,$new_height);
ImageCopyResized($new_im,$im,0,0,0,0,$new_width,
$new_height,ImageSX($im),ImageSY($im));
----
Manual Page -- http://www.php.net/manual/en/function.imagecreatetruecolor.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32818
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32818&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32818&report=yes