Skip to content

Commit

Permalink
Removed unused function
Browse files Browse the repository at this point in the history
The earlier gdAlphaBlend() has been replaced with commit 1286d9e, and has
been renamed to gdAlphaBlendOld(). The old function is, however, not used,
and after more than 9 years we're pretty sure we won't need it anymore.
  • Loading branch information
cmb69 committed Sep 15, 2016
1 parent d6f9c49 commit 04b166a
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions ext/gd/libgd/gd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2918,29 +2918,6 @@ int gdImageCompare (gdImagePtr im1, gdImagePtr im2)
return cmpStatus;
}

int
gdAlphaBlendOld (int dst, int src)
{
/* 2.0.12: TBB: alpha in the destination should be a
* component of the result. Thanks to Frank Warmerdam for
* pointing out the issue.
*/
return ((((gdTrueColorGetAlpha (src) *
gdTrueColorGetAlpha (dst)) / gdAlphaMax) << 24) +
((((gdAlphaTransparent - gdTrueColorGetAlpha (src)) *
gdTrueColorGetRed (src) / gdAlphaMax) +
(gdTrueColorGetAlpha (src) *
gdTrueColorGetRed (dst)) / gdAlphaMax) << 16) +
((((gdAlphaTransparent - gdTrueColorGetAlpha (src)) *
gdTrueColorGetGreen (src) / gdAlphaMax) +
(gdTrueColorGetAlpha (src) *
gdTrueColorGetGreen (dst)) / gdAlphaMax) << 8) +
(((gdAlphaTransparent - gdTrueColorGetAlpha (src)) *
gdTrueColorGetBlue (src) / gdAlphaMax) +
(gdTrueColorGetAlpha (src) *
gdTrueColorGetBlue (dst)) / gdAlphaMax));
}

int gdAlphaBlend (int dst, int src) {
int src_alpha = gdTrueColorGetAlpha(src);
int dst_alpha, alpha, red, green, blue;
Expand Down

0 comments on commit 04b166a

Please sign in to comment.