note 29946 added to function.imagetruecolortopalette
| From: | niels at myplace dot dk | Date: | Sat, 01 Mar 2003 19:46:55 +0000 |
| Subject: | note 29946 added to function.imagetruecolortopalette | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-44707@lists.php.net to get a copy of this message | ||
The is several known bugs related to this feature. When I use this function on my workstation Apache
segfaults. I tried to make a replacement function, only to find related bugs in other functions (or
maybe the same bug affecting several functions).
This replacement function works for me.
function imagetruecolortopalette_(&$img) {
$w = imagesx($img);
$h = imagesy($img);
$img2 = ImageCreate($w, $h);
imagecopyresized($img2, $img, 0, 0, 0, 0, $w, $h, $w, $h);
$img = $img2;
}
--
http://www.php.net/manual/en/function.imagetruecolortopalette.php
http://master.php.net/manage/user-notes.php?action=edit+29946
http://master.php.net/manage/user-notes.php?action=delete+29946
http://master.php.net/manage/user-notes.php?action=reject+29946