note 16092 added to function.imagecopy

From: Date: Tue, 16 Oct 2001 12:07:26 +0000
Subject: note 16092 added to function.imagecopy
Groups: php.notes 
Request: Send a blank email to php-notes+get-18975@lists.php.net to get a copy of this message
ImageCopy is bugged in GD 2.0.1, it will fail when copying a truecolor image over a palette image. Modifying gdImageCopy in gd.c at position if(colorMap[c]==(-1)) into if(src->trueColor) { nc = gdImageColorResolveAlpha(dst,gdTrueColorGetRed(c),gdTrueColorGetGreen(c),gdTrueColorGetBlue(c),gdTrueColorGetAlpha(c)); gdImageSetPixel (dst, tox, toy, nc); } else if(colorMap[c]==(-1)) ... will fix the problem. -- http://www.php.net/manual/en/function.imagecopy.php http://master.php.net/manage/user-notes.php?action=edit+16092 http://master.php.net/manage/user-notes.php?action=delete+16092 http://master.php.net/manage/user-notes.php?action=reject+16092

« previous php.notes (#18975) next »