/PHP-8.3/ext/gd/tests/ |
H A D | colorclosest.phpt | 11 imagedestroy($im); 13 $im = imagecreate(5,5); 20 imagedestroy($im); 22 $im = imagecreate(5,5); 26 imagedestroy($im); 28 $im = imagecreate(5,5); 34 $im = imagecreate(5,5); 49 imagedestroy($im); 51 $im = imagecreate(5,5); 58 imagedestroy($im); [all …]
|
H A D | colorresolve.phpt | 8 $im = imagecreatetruecolor(5,5); 11 imagedestroy($im); 13 $im = imagecreate(5,5); 16 imagedestroy($im); 18 $im = imagecreate(5,5); 24 $im = imagecreate(5,5); 41 imagedestroy($im); 43 $im = imagecreate(5,5); 46 imagedestroy($im); 48 $im = imagecreate(5,5); [all …]
|
H A D | dashedlines.phpt | 7 $im = imagecreatetruecolor(6,6); 8 imagefill($im, 0,0, 0xffffff); 14 imagesetstyle($im, $style); 29 imagedestroy($im); 31 $im = imagecreatetruecolor(6,6); 32 imagefill($im, 0,0, 0xffffff); 35 imagesetstyle($im, $style); 49 imagedestroy($im); 53 imagefill($im, 0,0, 0xffffff); 56 imagesetstyle($im, $style); [all …]
|
H A D | bug43475.phpt | 15 function setStyleAndThickness($im, $color, $thickness) 31 imagesetstyle($im, $style); 32 imagesetthickness($im, $thickness); 35 $im = imagecreate(800, 800); 36 imagecolorallocate($im, 255, 255, 255); 37 $black = imagecolorallocate($im, 0, 0, 0); 39 setStyleAndThickness($im, $black, 1); 40 imageline($im, 50, 250, 550, 250, IMG_COLOR_STYLED); 44 setStyleAndThickness($im, $black, 2); 49 setStyleAndThickness($im, $black, 4); [all …]
|
H A D | lines.phpt | 7 $im = imagecreatetruecolor(6,6); 8 imagefill($im, 0,0, 0xffffff); 11 imageline($im, 0,5, 5,5, 0x00ff00); 23 $im = imagecreatetruecolor(6,6); 24 imagefill($im, 0,0, 0xffffff); 39 $im = imagecreatetruecolor(6,6); 40 imagefill($im, 0,0, 0xffffff); 60 $im = imagecreatetruecolor(6,6); 61 imagefill($im, 0,0, 0xffffff); 74 imagefill($im, 0,0, 0xffffff); [all …]
|
H A D | test_image_equals_file_palette.phpt | 9 $im = imagecreate(10, 10); 10 imagecolorallocate($im, 255, 255, 255); 11 $red = imagecolorallocate($im, 255, 0, 0); 12 imagefilledrectangle($im, 3,3, 7,7, $red); 15 imagepng($im, $filename); 17 $im = imagecreate(10, 10); 18 imagecolorallocate($im, 255, 255, 255); 22 test_image_equals_file($filename, $im); 24 $im = imagecreate(10, 10); 25 imagecolorallocate($im, 255, 255, 255); [all …]
|
H A D | colorexact.phpt | 8 $im = imagecreatetruecolor(5,5); 9 $c = imagecolorexact($im, 255,0,255); 10 $c2 = imagecolorexactalpha($im, 255,0,255, 100); 15 imagedestroy($im); 17 $im = imagecreate(5,5); 18 $c = imagecolorallocate($im, 255,0,255); 19 $c2 = imagecolorallocate($im, 255,200,0); 22 echo imagecolorexact($im, 255,0,255) . "\n"; 23 echo imagecolorexact($im, 255,200,0) . "\n"; 28 echo imagecolorexact($im, 12,12,12) . "\n"; [all …]
|
H A D | imagefttext.phpt | 16 function testrun($im, $fontfile) { 17 $sx = imagesx($im); 18 $sy = imagesy($im); 35 // imagecolordeallocate($im, $colour_w); 36 // imagecolordeallocate($im, $colour_b); 41 $im = imagecreate(256, 256); 42 var_dump(testrun($im, $fontfile_8859)); 43 imagedestroy($im); 45 $im = imagecreatetruecolor(256, 256); 46 var_dump(testrun($im, $fontfile_8859)); [all …]
|
H A D | imageflip.phpt | 8 $im = imagecreatetruecolor( 99, 99 ); 10 imagesetpixel($im, 0, 0, 0xFF); 11 imagesetpixel($im, 0, 98, 0x00FF00); 12 imagesetpixel($im, 98, 0, 0xFF0000); 13 imagesetpixel($im, 98, 98, 0x0000FF); 15 imageflip($im, IMG_FLIP_HORIZONTAL); 16 imageflip($im, IMG_FLIP_VERTICAL); 17 imageflip($im, IMG_FLIP_BOTH); 19 var_dump(dechex(imagecolorat($im, 0, 0))); 20 var_dump(dechex(imagecolorat($im, 0, 98))); [all …]
|
H A D | imageopenpolygon_basic.phpt | 9 $im = imagecreatetruecolor(100, 100); 10 $white = imagecolorallocate($im, 255, 255, 255); 11 $black = imagecolorallocate($im, 0, 0, 0); 12 $red = imagecolorallocate($im, 255, 0, 0); 13 $green = imagecolorallocate($im, 0, 128, 0); 14 $blue = imagecolorallocate($im, 0, 0, 255); 15 imagefilledrectangle($im, 0,0, 99,99, $white); 17 imageopenpolygon($im, [10,10, 49,89, 89,10], $black); 18 imageopenpolygon($im, [10,89, 35,10, 60,89, 85,10], $red); 19 imageopenpolygon($im, [10,49, 30,89, 50,10, 70,89, 90,10], $green); [all …]
|
H A D | imagecrop_auto.phpt | 13 $im = imagecreatetruecolor(99, 99); 14 imagefilledrectangle($im, 20, 20, 30, 30, 0xff); 15 $im_crop = imagecropauto($im, IMG_CROP_DEFAULT); 20 $im = imagecreate(99, 99); 27 $im = imagecreatetruecolor(99, 99); 29 $im_crop = imagecropauto($im, IMG_CROP_SIDES); 34 $im = imagecreate(99, 99); 41 $im = imagecreatetruecolor(50, 50); 48 $im = imagecreate(50, 50); 49 $bgd = imagecolorallocate($im, 0, 0, 0); [all …]
|
H A D | colorat.phpt | 7 $file = __DIR__ . '/im.wbmp'; 9 $im = imagecreatetruecolor(6,6); 10 imagefill($im, 0,0, 0xffffff); 11 imagesetpixel($im, 3,3, 0x0); 15 $c = imagecolorat($im, 3,3); 18 imagedestroy($im); 20 $im = imagecreate(6,6); 22 $c2 = imagecolorallocate($im, 0,0,0); 24 imagefill($im, 0,0, $c1); 25 imagesetpixel($im, 3,3, $c2); [all …]
|
H A D | bug36697-mb.phpt | 9 $im = imagecreatetruecolor(192, 36); 10 $trans_color = imagecolorallocate($im, 255, 0, 0); 11 $color = imagecolorallocate($im, 255, 255, 255); 12 imagecolortransparent($im, $trans_color); 13 imagefilledrectangle($im, 0,0, 192,36, $trans_color); 14 $c = imagecolorat($im, 191,35); 15 imagegif($im, $dest); 16 imagedestroy($im); 17 $im = imagecreatefromgif($dest); 18 $c = imagecolorat($im, 191, 35); [all …]
|
H A D | bug36697.phpt | 9 $im = imagecreatetruecolor(192, 36); 10 $trans_color = imagecolorallocate($im, 255, 0, 0); 11 $color = imagecolorallocate($im, 255, 255, 255); 12 imagecolortransparent($im, $trans_color); 13 imagefilledrectangle($im, 0,0, 192,36, $trans_color); 14 $c = imagecolorat($im, 191,35); 15 imagegif($im, $dest); 16 imagedestroy($im); 17 $im = imagecreatefromgif($dest); 18 $c = imagecolorat($im, 191, 35); [all …]
|
H A D | bug52070.phpt | 7 $im = imagecreate(1200, 800); 8 $background_color = imagecolorallocate($im, 40, 40, 40); 9 $color = imagecolorallocate($im, 255, 255, 255); 10 imagedashedline($im, 800, 400, 300, 400, $color); 11 imagedashedline($im, 800, 400, 300, 800, $color); 12 imagedashedline($im, 800, 400, 400, 800, $color); 13 imagedashedline($im, 800, 400, 500, 800, $color); 14 imagedashedline($im, 800, 400, 600, 800, $color); 15 imagedashedline($im, 800, 400, 700, 800, $color); 16 imagedashedline($im, 800, 400, 800, 800, $color); [all …]
|
H A D | gif.phpt | 46 $im = imagecreate(10,10); 49 imagegif($im, $cwd . '/test_gif.gif'); 54 $im = imagecreate(10,10); 59 imagegif($im, $cwd . '/test_gif.gif'); 66 $im = imagecreate(10,10); 71 imagegif($im, $cwd . '/test_gif.gif'); 78 $im = imagecreate(10,10); 83 imagegif($im, $cwd . '/test_gif.gif'); 90 $im = imagecreate(10,10); 101 $im = imagecreate(10,10); [all …]
|
/PHP-8.3/ext/gd/libgd/ |
H A D | gd_gd.c | 86 im->open[i] = 0; in _gdGetColors() 99 gdImagePtr im; in _gdCreateFromFile() local 128 if(!im) { in _gdCreateFromFile() 135 return im; in _gdCreateFromFile() 144 gdImagePtr im; in gdImageCreateFromGd() local 152 return im; in gdImageCreateFromGd() 157 gdImagePtr im; in gdImageCreateFromGdPtr() local 162 return im; in gdImageCreateFromGdPtr() 169 gdImagePtr im; in gdImageCreateFromGdCtx() local 174 if (im == NULL) { in gdImageCreateFromGdCtx() [all …]
|
H A D | gd_transform.c | 7 if (im->trueColor) { in gdImageFlipVertical() 10 int *row_src = im->tpixels[im->sy - 1 - y]; in gdImageFlipVertical() 14 row_dst[x] = im->tpixels[im->sy - 1 - y][x]; in gdImageFlipVertical() 22 p = im->pixels[y][x]; in gdImageFlipVertical() 23 im->pixels[y][x] = im->pixels[im->sy - 1 - y][x]; in gdImageFlipVertical() 24 im->pixels[im->sy - 1 - y][x] = p; in gdImageFlipVertical() 36 if (im->trueColor) { in gdImageFlipHorizontal() 40 px1 = im->tpixels[y]; in gdImageFlipHorizontal() 41 px2 = im->tpixels[y] + im->sx - 1; in gdImageFlipHorizontal() 54 px1 = im->pixels[y]; in gdImageFlipHorizontal() [all …]
|
H A D | gd_crop.c | 200 if (!gdImageTrueColor(im) && color >= gdImageColorsTotal(im)) { in gdImageCropThreshold() 258 const int tr = gdImageGetPixel(im, gdImageSX(im) - 1, 0); in gdGuessBackgroundColorFromCorners() 259 const int bl = gdImageGetPixel(im, 0, gdImageSY(im) -1); in gdGuessBackgroundColorFromCorners() 260 const int br = gdImageGetPixel(im, gdImageSX(im) - 1, gdImageSY(im) -1); in gdGuessBackgroundColorFromCorners() 286 …r = (int)(0.5f + (gdImageRed(im, tl) + gdImageRed(im, tr) + gdImageRed(im, bl) + gdImageRed(im, br… in gdGuessBackgroundColorFromCorners() 287 …g = (int)(0.5f + (gdImageGreen(im, tl) + gdImageGreen(im, tr) + gdImageGreen(im, bl) + gdImageGree… in gdGuessBackgroundColorFromCorners() 288 …b = (int)(0.5f + (gdImageBlue(im, tl) + gdImageBlue(im, tr) + gdImageBlue(im, bl) + gdImageBlue(im… in gdGuessBackgroundColorFromCorners() 289 …a = (int)(0.5f + (gdImageAlpha(im, tl) + gdImageAlpha(im, tr) + gdImageAlpha(im, bl) + gdImageAlph… in gdGuessBackgroundColorFromCorners() 297 const int dr = gdImageRed(im, col1) - gdImageRed(im, col2); in gdColorMatch() 298 const int dg = gdImageGreen(im, col1) - gdImageGreen(im, col2); in gdColorMatch() [all …]
|
H A D | gd.h | 764 #define gdImageTrueColor(im) ((im)->trueColor) argument 766 #define gdImageSX(im) ((im)->sx) argument 767 #define gdImageSY(im) ((im)->sy) argument 768 #define gdImageColorsTotal(im) ((im)->colorsTotal) argument 770 (im)->red[(c)]) 777 #define gdImageGetTransparent(im) ((im)->transparent) argument 778 #define gdImageGetInterlaced(im) ((im)->interlace) argument 785 #define gdImagePalettePixel(im, x, y) (im)->pixels[(y)][(x)] argument 787 #define gdImageResolutionX(im) (im)->res_x argument 788 #define gdImageResolutionY(im) (im)->res_y argument [all …]
|
H A D | gd.c | 216 im->cx2 = im->sx - 1; in gdImageCreate() 217 im->cy2 = im->sy - 1; in gdImageCreate() 268 im->cx2 = im->sx - 1; in gdImageCreateTrueColor() 269 im->cy2 = im->sy - 1; in gdImageCreateTrueColor() 487 dist = HWB_Diff(im->red[i], im->green[i], im->blue[i], r, g, b); in gdImageColorClosestHWB() 512 if ((im->red[i] == r) && (im->green[i] == g) && (im->blue[i] == b) && (im->alpha[i] == a)) { in gdImageColorExactAlpha() 777 im->stylePos = im->stylePos % im->styleLength; in gdImageSetPixel() 788 im->stylePos = im->stylePos % im->styleLength; in gdImageSetPixel() 833 …return gdTrueColorAlpha(im->red[p], im->green[p], im->blue[p], (im->transparent == p) ? gdAlphaTra… in gdImageGetTrueColorPixel() 1940 wx2=im->sx;wy2=im->sy; in gdImageFill() [all …]
|
H A D | gd_webp.c | 17 gdImagePtr im; in gdImageCreateFromWebp() local 24 return im; in gdImageCreateFromWebp() 30 gdImagePtr im; in gdImageCreateFromWebpPtr() local 36 return im; in gdImageCreateFromWebpPtr() 45 gdImagePtr im; in gdImageCreateFromWebpCtx() local 77 if (!im) { in gdImageCreateFromWebpCtx() 101 return im; in gdImageCreateFromWebpCtx() 129 if (overflow2(gdImageSX(im) * 4, gdImageSY(im))) { in gdImageWebpCtx() 133 argb = (uint8_t *)gdMalloc(gdImageSX(im) * 4 * gdImageSY(im)); in gdImageWebpCtx() 157 out_size = WebPEncodeLosslessRGBA(argb, gdImageSX(im), gdImageSY(im), gdImageSX(im) * 4, &out); in gdImageWebpCtx() [all …]
|
H A D | gd_pixelate.c | 14 for (y = 0; y < im->sy; y += block_size) { in gdImagePixelate() 15 for (x = 0; x < im->sx; x += block_size) { in gdImagePixelate() 16 if (gdImageBoundsSafe(im, x, y)) { in gdImagePixelate() 17 int c = gdImageGetPixel(im, x, y); in gdImagePixelate() 24 for (y = 0; y < im->sy; y += block_size) { in gdImagePixelate() 25 for (x = 0; x < im->sx; x += block_size) { in gdImagePixelate() 37 c = gdImageGetPixel(im, x + cx, y + cy); in gdImagePixelate() 38 a += gdImageAlpha(im, c); in gdImagePixelate() 39 r += gdImageRed(im, c); in gdImagePixelate() 40 g += gdImageGreen(im, c); in gdImagePixelate() [all …]
|
H A D | webpng.c | 28 gdImagePtr im = 0; in main() local 64 if (!im) in main() 140 if (!im->trueColor) in main() 149 gdImageRed (im, j), in main() 150 gdImageGreen (im, j), in main() 151 gdImageBlue (im, j), in main() 166 gdImageSX (im), gdImageSY (im), in main() 192 maxx = gdImageSX(im); in main() 193 maxy = gdImageSY(im); in main() 197 if (im->trueColor) { in main() [all …]
|
H A D | gd_png.c | 101 gdImagePtr im; in gdImageCreateFromPng() local 106 return im; in gdImageCreateFromPng() 111 gdImagePtr im; in gdImageCreateFromPngPtr() local 115 return im; in gdImageCreateFromPngPtr() 138 gdImagePtr im = NULL; in gdImageCreateFromPngCtx() local 206 if (im == NULL) { in gdImageCreateFromPngCtx() 228 if (im) { in gdImageCreateFromPngCtx() 363 open = im->open; in gdImageCreateFromPngCtx() 442 return im; in gdImageCreateFromPngCtx() 616 if (im->trueColor && !im->saveAlphaFlag && (transparent >= 0)) { in gdImagePngCtxEx() [all …]
|