#22, Fixed transparency preservation in gdImageCopyRotated
parent
ff8afda831
commit
26adab01fa
|
@ -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
|
||||
|
|
11
src/gd.c
11
src/gd.c
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue