note 16092 deleted from function.imagecopy by jimw
| From: | jimw@php.net | Date: | Tue, 16 Oct 2001 17:21:57 +0000 |
| Subject: | note 16092 deleted from function.imagecopy by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-18996@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.