Commits

Anonymous committed 26adab0

#22, Fixed transparency preservation in gdImageCopyRotated

Comments (0)

Files changed (2)

 #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 
   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);