Skip to content

Commit e5411e1

Browse files
committed
Remove unused _setEdgePixel() and getPixelOverflowColorTC() functions
1 parent 5c844c1 commit e5411e1

File tree

1 file changed

+0
-56
lines changed

1 file changed

+0
-56
lines changed

ext/gd/libgd/gd_interpolation.c

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -658,14 +658,6 @@ static inline int _color_blend (const int dst, const int src)
658658
}
659659
}
660660

661-
static inline int _setEdgePixel(const gdImagePtr src, unsigned int x, unsigned int y, gdFixed coverage, const int bgColor)
662-
{
663-
const gdFixed f_127 = gd_itofx(127);
664-
register int c = src->tpixels[y][x];
665-
c = c | (( (int) (gd_fxtof(gd_mulfx(coverage, f_127)) + 50.5f)) << 24);
666-
return _color_blend(bgColor, c);
667-
}
668-
669661
static inline int getPixelOverflowTC(gdImagePtr im, const int x, const int y, const int bgColor)
670662
{
671663
if (gdImageBoundsSafe(im, x, y)) {
@@ -1138,54 +1130,6 @@ gdImagePtr gdImageScaleNearestNeighbour(gdImagePtr im, const unsigned int width,
11381130
return dst_img;
11391131
}
11401132

1141-
static inline int getPixelOverflowColorTC(gdImagePtr im, const int x, const int y, const int color)
1142-
{
1143-
if (gdImageBoundsSafe(im, x, y)) {
1144-
const int c = im->tpixels[y][x];
1145-
if (c == im->transparent) {
1146-
return gdTrueColorAlpha(0, 0, 0, 127);
1147-
}
1148-
return c;
1149-
} else {
1150-
register int border = 0;
1151-
if (y < im->cy1) {
1152-
border = im->tpixels[0][im->cx1];
1153-
goto processborder;
1154-
}
1155-
1156-
if (y < im->cy1) {
1157-
border = im->tpixels[0][im->cx1];
1158-
goto processborder;
1159-
}
1160-
1161-
if (y > im->cy2) {
1162-
if (x >= im->cx1 && x <= im->cx1) {
1163-
border = im->tpixels[im->cy2][x];
1164-
goto processborder;
1165-
} else {
1166-
return gdTrueColorAlpha(0, 0, 0, 127);
1167-
}
1168-
}
1169-
1170-
/* y is bound safe at this point */
1171-
if (x < im->cx1) {
1172-
border = im->tpixels[y][im->cx1];
1173-
goto processborder;
1174-
}
1175-
1176-
if (x > im->cx2) {
1177-
border = im->tpixels[y][im->cx2];
1178-
}
1179-
1180-
processborder:
1181-
if (border == im->transparent) {
1182-
return gdTrueColorAlpha(0, 0, 0, 127);
1183-
} else{
1184-
return gdTrueColorAlpha(gdTrueColorGetRed(border), gdTrueColorGetGreen(border), gdTrueColorGetBlue(border), 127);
1185-
}
1186-
}
1187-
}
1188-
11891133
static gdImagePtr gdImageScaleBilinearPalette(gdImagePtr im, const unsigned int new_width, const unsigned int new_height)
11901134
{
11911135
long _width = MAX(1, new_width);

0 commit comments

Comments
 (0)