#22, Fixed transparency preservation in gdImageCopyRotated

master
pajoye 2007-01-03 20:34:50 +00:00
parent ff8afda831
commit 26adab01fa
2 changed files with 12 additions and 0 deletions

View File

@ -43,3 +43,4 @@ GDBUGS NEWS
#19, Use abs instead of fbas in HWB_Diff (Nick Atty)
#20, Fixed gdImageCopyMergeGray when used with a true color image
#21, gdImageCopyResized sanity check for allocation failures
#22, Fixed transparency preservation in gdImageCopyRotated

View File

@ -2425,6 +2425,17 @@ BGD_DECLARE(void) gdImageCopyRotated (gdImagePtr dst,
double scY = srcY + ((double) srcHeight) / 2;
int cmap[gdMaxColors];
int i;
/*
2.0.34: transparency preservation. The transparentness of
the transparent color is more important than its hue.
*/
if (src->transparent != -1) {
if (dst->transparent == -1) {
dst->transparent = src->transparent;
}
}
for (i = 0; (i < gdMaxColors); i++)
{
cmap[i] = (-1);