Lines Matching refs:src

138 static int gdAlphaOverlayColor(int src, int dst, int max);
2226 void gdImageCopy (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, int w, in… in gdImageCopy() argument
2240 if (src->trueColor) { in gdImageCopy()
2243 int c = gdImageGetTrueColorPixel (src, srcX + x, srcY + y); in gdImageCopy()
2244 if (c != src->transparent) { in gdImageCopy()
2253 int c = gdImageGetPixel (src, srcX + x, srcY + y); in gdImageCopy()
2254 if (c != src->transparent) { in gdImageCopy()
2255 …ageSetPixel(dst, dstX + x, dstY + y, gdTrueColorAlpha(src->red[c], src->green[c], src->blue[c], sr… in gdImageCopy()
2273 c = gdImageGetPixel (src, x, y); in gdImageCopy()
2275 if (gdImageGetTransparent (src) == c) { in gdImageCopy()
2280 if (src->trueColor) { in gdImageCopy()
2287 if (dst == src) { in gdImageCopy()
2291 nc = gdImageColorResolveAlpha (dst, src->red[c], src->green[c], src->blue[c], src->alpha[c]); in gdImageCopy()
2307 void gdImageCopyMerge (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, int … in gdImageCopyMerge() argument
2319 c = gdImageGetPixel(src, x, y); in gdImageCopyMerge()
2321 if (gdImageGetTransparent(src) == c) { in gdImageCopyMerge()
2326 if (dst == src) { in gdImageCopyMerge()
2331 … ncR = (int)(gdImageRed (src, c) * (pct / 100.0) + gdImageRed (dst, dc) * ((100 - pct) / 100.0)); in gdImageCopyMerge()
2332 …ncG = (int)(gdImageGreen (src, c) * (pct / 100.0) + gdImageGreen (dst, dc) * ((100 - pct) / 100.0)… in gdImageCopyMerge()
2333 … ncB = (int)(gdImageBlue (src, c) * (pct / 100.0) + gdImageBlue (dst, dc) * ((100 - pct) / 100.0)); in gdImageCopyMerge()
2347 void gdImageCopyMergeGray (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, … in gdImageCopyMergeGray() argument
2360 c = gdImageGetPixel (src, x, y); in gdImageCopyMergeGray()
2362 if (gdImageGetTransparent(src) == c) { in gdImageCopyMergeGray()
2372 if (dst == src && pct == 100) { in gdImageCopyMergeGray()
2378 ncR = (int)(gdImageRed (src, c) * (pct / 100.0f) + g * ((100 - pct) / 100.0)); in gdImageCopyMergeGray()
2379 ncG = (int)(gdImageGreen (src, c) * (pct / 100.0f) + g * ((100 - pct) / 100.0)); in gdImageCopyMergeGray()
2380 ncB = (int)(gdImageBlue (src, c) * (pct / 100.0f) + g * ((100 - pct) / 100.0)); in gdImageCopyMergeGray()
2401 void gdImageCopyResized (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, in… in gdImageCopyResized() argument
2444 if (!src->trueColor) { in gdImageCopyResized()
2445 int tmp = gdImageGetPixel (src, x, y); in gdImageCopyResized()
2446 mapTo = gdImageGetTrueColorPixel (src, x, y); in gdImageCopyResized()
2447 if (gdImageGetTransparent (src) == tmp) { in gdImageCopyResized()
2454 mapTo = gdImageGetTrueColorPixel (src, x, y); in gdImageCopyResized()
2456 if (gdImageGetTransparent (src) == mapTo) { in gdImageCopyResized()
2463 c = gdImageGetPixel (src, x, y); in gdImageCopyResized()
2465 if (gdImageGetTransparent (src) == c) { in gdImageCopyResized()
2469 if (src->trueColor) { in gdImageCopyResized()
2479 if (dst == src) { in gdImageCopyResized()
2484 nc = gdImageColorResolveAlpha(dst, gdImageRed(src, c), in gdImageCopyResized()
2485 gdImageGreen(src, c), in gdImageCopyResized()
2486 gdImageBlue(src, c), in gdImageCopyResized()
2487 gdImageAlpha(src, c)); in gdImageCopyResized()
2511 void gdImageCopyResampled (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, … in gdImageCopyResampled() argument
2517 gdImageCopyResized (dst, src, dstX, dstY, srcX, srcY, dstW, dstH, srcW, srcH); in gdImageCopyResampled()
2561 p = gdImageGetTrueColorPixel(src, (int) sx + srcX, (int) sy + srcY); in gdImageCopyResampled()
2906 int gdAlphaBlend (int dst, int src) { in gdAlphaBlend() argument
2907 int src_alpha = gdTrueColorGetAlpha(src); in gdAlphaBlend()
2915 return src; in gdAlphaBlend()
2921 return src; in gdAlphaBlend()
2937 red = (gdTrueColorGetRed(src) * src_weight in gdAlphaBlend()
2939 green = (gdTrueColorGetGreen(src) * src_weight in gdAlphaBlend()
2941 blue = (gdTrueColorGetBlue(src) * src_weight in gdAlphaBlend()
2961 int gdLayerOverlay (int dst, int src) in gdLayerOverlay() argument
2965 a2 = gdAlphaMax - gdTrueColorGetAlpha(src); in gdLayerOverlay()
2967 (gdAlphaOverlayColor( gdTrueColorGetRed(src), gdTrueColorGetRed(dst), gdRedMax ) << 16) + in gdLayerOverlay()
2968 (gdAlphaOverlayColor( gdTrueColorGetGreen(src), gdTrueColorGetGreen(dst), gdGreenMax ) << 8) + in gdLayerOverlay()
2969 (gdAlphaOverlayColor( gdTrueColorGetBlue(src), gdTrueColorGetBlue(dst), gdBlueMax )) in gdLayerOverlay()
2973 static int gdAlphaOverlayColor (int src, int dst, int max ) in gdAlphaOverlayColor() argument
2987 return dst + (src << 1) - (dst * src / max) - max; in gdAlphaOverlayColor()
2990 return dst * src / max; in gdAlphaOverlayColor()
2994 int gdLayerMultiply (int dst, int src) in gdLayerMultiply() argument
2997 a1 = gdAlphaMax - gdTrueColorGetAlpha(src); in gdLayerMultiply()
3000 r1 = gdRedMax - (a1 * (gdRedMax - gdTrueColorGetRed(src))) / gdAlphaMax; in gdLayerMultiply()
3002 g1 = gdGreenMax - (a1 * (gdGreenMax - gdTrueColorGetGreen(src))) / gdAlphaMax; in gdLayerMultiply()
3004 b1 = gdBlueMax - (a1 * (gdBlueMax - gdTrueColorGetBlue(src))) / gdAlphaMax; in gdLayerMultiply()
3063 int gdImagePaletteToTrueColor(gdImagePtr src) in gdImagePaletteToTrueColor() argument
3068 if (src == NULL) { in gdImagePaletteToTrueColor()
3072 if (src->trueColor == 1) { in gdImagePaletteToTrueColor()
3076 const unsigned int sy = gdImageSY(src); in gdImagePaletteToTrueColor()
3077 const unsigned int sx = gdImageSX(src); in gdImagePaletteToTrueColor()
3079 src->tpixels = (int **) gdMalloc(sizeof(int *) * sy); in gdImagePaletteToTrueColor()
3080 if (src->tpixels == NULL) { in gdImagePaletteToTrueColor()
3085 const unsigned char *src_row = src->pixels[y]; in gdImagePaletteToTrueColor()
3089 src->tpixels[y] = (int *) gdMalloc(sx * sizeof(int)); in gdImagePaletteToTrueColor()
3090 if (src->tpixels[y] == NULL) { in gdImagePaletteToTrueColor()
3094 dst_row = src->tpixels[y]; in gdImagePaletteToTrueColor()
3097 if (c == src->transparent) { in gdImagePaletteToTrueColor()
3100 *(dst_row + x) = gdTrueColorAlpha(src->red[c], src->green[c], src->blue[c], src->alpha[c]); in gdImagePaletteToTrueColor()
3108 gdFree(src->pixels[yy]); in gdImagePaletteToTrueColor()
3110 gdFree(src->pixels); in gdImagePaletteToTrueColor()
3111 src->trueColor = 1; in gdImagePaletteToTrueColor()
3112 src->pixels = NULL; in gdImagePaletteToTrueColor()
3113 src->alphaBlendingFlag = 0; in gdImagePaletteToTrueColor()
3114 src->saveAlphaFlag = 1; in gdImagePaletteToTrueColor()
3116 if (src->transparent >= 0) { in gdImagePaletteToTrueColor()
3117 const unsigned char c = src->transparent; in gdImagePaletteToTrueColor()
3118 src->transparent = gdTrueColorAlpha(src->red[c], src->green[c], src->blue[c], src->alpha[c]); in gdImagePaletteToTrueColor()
3126 gdFree(src->tpixels[yy]); in gdImagePaletteToTrueColor()
3128 gdFree(src->tpixels); in gdImagePaletteToTrueColor()