Home
last modified time | relevance | path

Searched refs:image (Results 1 – 25 of 266) sorted by relevance

1234567891011

/PHP-7.4/ext/gd/libgd/
H A Dgdxpm.c21 XpmImage image; in gdImageCreateFromXpm() local
34 number = image.ncolors; in gdImageCreateFromXpm()
36 if (!image.colorTable[i].c_color) { in gdImageCreateFromXpm()
41 if (!(im = gdImageCreate(image.width, image.height))) { in gdImageCreateFromXpm()
50 buf[0] = image.colorTable[i].c_color[1]; in gdImageCreateFromXpm()
53 buf[0] = image.colorTable[i].c_color[2]; in gdImageCreateFromXpm()
56 buf[0] = image.colorTable[i].c_color[3]; in gdImageCreateFromXpm()
125 pointer = (int *) image.data; in gdImageCreateFromXpm()
126 for (i = 0; i < image.height; i++) { in gdImageCreateFromXpm()
127 for (j = 0; j < image.width; j++) { in gdImageCreateFromXpm()
[all …]
/PHP-7.4/ext/gd/tests/
H A Dbug40764.phpt9 $image=imagecreatetruecolor(400, 400);
11 $black = imagecolorallocate($image, 0, 0, 0);
14 imagefill($image, 0, 0, $white);
15 imagesetthickness($image, 10);
19 imageline($image, 0, 0, 392, 392, $black);
21 imagesetthickness($image, 1);
23 imageline($image, 200, 0, 200, 400, $red);
24 imageline($image, 0, 200, 400, 200, $red);
25 imageline($image, 0, 0, 392, 392, $red);
26 print_r(imagecolorat($image, 195, 0));
[all …]
H A Dimagecolorclosesthwb_basic_001.phpt11 // Create the size of image or blank image
12 $image = imagecreate(500, 200);
14 // Set the background color of image
15 $background_color = imagecolorallocate($image, 0, 24, 200);
17 // Set the text color of image
18 $text_color = imagecolorallocate($image, 255, 255, 255);
20 // Function to create image which contains string.
24 var_dump(imagecolorclosesthwb($image, 0, 115, 152)); // 0
25 var_dump(imagecolorclosesthwb($image, 0, 24, 200)); // 0
27 var_dump(imagecolorclosesthwb($image, 50, 0, 90)); // 0
[all …]
H A Dbug67447.phpt12 $image = imagecreatetruecolor(500, 500);
13 $red = imagecolorallocate($image, 255, 0, 0);
14 imagefill($image, 0, 0, $red);
15 $cropped = imagecrop($image, ['x' => 0, 'y' => 0, 'width' => 250, 'height' => 250]);
17 imagedestroy($image);
21 $image = imagecreate(500, 500);
22 imagecolorallocate($image, 0, 0, 255); // first palette color = background
23 $red = imagecolorallocate($image, 255, 0, 0);
24 imagefill($image, 0, 0, $red);
25 $cropped = imagecrop($image, ['x' => 0, 'y' => 0, 'width' => 250, 'height' => 250]);
[all …]
H A Dimagefilltoborder_basic.phpt12 // Create a image
13 $image = imagecreatetruecolor( 100, 100 );
16 imagefilledrectangle( $image, 0, 0, 100, 100, imagecolorallocate( $image, 255, 255, 255 ) );
19 imageellipse( $image, 50, 50, 50, 50, imagecolorallocate( $image, 0, 0, 0 ) );
22 imagefilltoborder( $image, 50, 50, imagecolorallocate( $image, 0, 0, 0 ), imagecolorallocate( $imag…
25 test_image_equals_file(__DIR__ . '/imagefilltoborder_basic.png', $image);
H A Dimagedashedline_basic.phpt13 * Source code: ext/standard/image.c
22 // create a blank image
23 $image = imagecreatetruecolor(250, 250);
26 $bg = imagecolorallocate($image, 0, 0, 0);
29 $col_line = imagecolorallocate($image, 255, 0, 0);
36 imagepng($image, $dest);
39 $col1 = imagecolorat($image, 100, 230);
41 $col2 = imagecolorat($image, 5, 5);
43 $color1 = imagecolorsforindex($image, $col1);
44 $color2 = imagecolorsforindex($image, $col2);
[all …]
H A Dimagepolygon_basic.phpt21 // create a blank image
22 $image = imagecreatetruecolor(400, 300);
25 $bg = imagecolorallocate($image, 0, 0, 0);
28 $col_poly = imagecolorallocate($image, 255, 0, 0);
31 imagepolygon($image, array (
40 imagepng($image, $dest);
42 $col1 = imagecolorat($image, 100, 200);
43 $col2 = imagecolorat($image, 100, 100);
44 $color1 = imagecolorsforindex($image, $col1);
45 $color2 = imagecolorsforindex($image, $col2);
[all …]
H A Dbug73614.phpt12 $image = imagecreatetruecolor(500, 500);
14 $white = imagecolorallocate($image, 0xFF, 0xFF, 0xFF);
15 $navy = imagecolorallocate($image, 0x00, 0x00, 0x80);
16 $red = imagecolorallocate($image, 0xFF, 0x00, 0x00);
18 imagefilledarc($image, 250, 250, 500, 250, 0, 88, $white, IMG_ARC_PIE);
19 imagefilledarc($image, 250, 250, 500, 250, 88, 91 , $navy, IMG_ARC_PIE);
20 imagefilledarc($image, 250, 250, 500, 250, 91, 360 , $red, IMG_ARC_PIE);
22 test_image_equals_file(__DIR__ . '/bug73614.png', $image);
H A Dgithub_bug_215.phpt12 $image = imagecreate( 10, 10 );
13 $bgd = imagecolorallocate( $image, 0, 0, 0 );
14 $border = imagecolorallocate( $image, 255, 0, 0 );
15 $fillcolor = imagecolorallocate( $image, 255, 0, 0 );
18 imagefilltoborder( $image, 0,0, $border+10, $fillcolor);
22 imagefilltoborder( $image, 0,0, -$border, $fillcolor);
27 imagefilltoborder( $image, 0,0, $border, $fillcolor+10);
31 imagefilltoborder( $image, 0,0, $border, -$fillcolor);
36 imagefilltoborder( $image, 0,0, $border+10, $fillcolor+10);
H A Dimagefilltoborder_error6.phpt12 // Create a image
13 $image = imagecreatetruecolor( 100, 100 );
16 imagefilledrectangle( $image, 0, 0, 100, 100, imagecolorallocate( $image, 255, 255, 255 ) );
19 imageellipse( $image, 50, 50, 50, 50, imagecolorallocate( $image, 0, 0, 0 ) );
23 …illtoborder( $image_foo, 50, 50, imagecolorallocate( $image, 0, 0, 0 ), imagecolorallocate( $image
H A Dimagegammacorrect_variation1.phpt2 Testing imagegammacorrect() of GD library with non TrueColor image
15 $image = imagecreate(150, 150);
17 $grey = imagecolorallocate($image,6,6,6);
18 $gray = imagecolorallocate($image,15,15,15);
20 $half = imagefilledarc ( $image, 75, 75, 70, 70, 0, 180, $grey, IMG_ARC_PIE );
21 $half2 = imagefilledarc ( $image, 75, 75, 70, 70, 0, -180, $gray, IMG_ARC_PIE );
23 $gamma = imagegammacorrect($image, 1, 5);
27 test_image_equals_file(__DIR__ . '/imagegammacorrect_variation1.png', $image);
H A Dimagesetthickness_basic.phpt12 // Create a 200x100 image
13 $image = imagecreatetruecolor(200, 100);
14 $white = imagecolorallocate($image, 0xFF, 0xFF, 0xFF);
15 $black = imagecolorallocate($image, 0x00, 0x00, 0x00);
18 imagefilledrectangle($image, 0, 0, 299, 99, $white);
21 imagesetthickness($image, 5);
24 imagerectangle($image, 14, 14, 185, 85, $black);
27 test_image_equals_file(__DIR__ . '/imagesetthickness_basic.png', $image);
H A Dbug22544-mb.phpt11 $image = imageCreateTruecolor(640, 100);
12 $transparent = imageColorAllocate($image, 0, 0, 0);
13 $red = imageColorAllocate($image, 255, 50, 50);
14 imageColorTransparent($image, $transparent);
15 imageFilledRectangle($image, 0, 0, 640-1, 100-1, $transparent);
17 test_image_equals_file(__DIR__ . '/bug22544私はガラスを食べられます.png', $image);
H A Dbug22544.phpt11 $image = imageCreateTruecolor(640, 100);
12 $transparent = imageColorAllocate($image, 0, 0, 0);
13 $red = imageColorAllocate($image, 255, 50, 50);
14 imageColorTransparent($image, $transparent);
15 imageFilledRectangle($image, 0, 0, 640-1, 100-1, $transparent);
17 test_image_equals_file(__DIR__ . '/bug22544.png', $image);
H A Dimagegammacorrect_basic.phpt15 $image = imagecreatetruecolor(150, 150);
17 $grey = imagecolorallocate($image,6,6,6);
18 $gray = imagecolorallocate($image,15,15,15);
20 $half = imagefilledarc ( $image, 75, 75, 70, 70, 0, 180, $grey, IMG_ARC_PIE );
21 $half2 = imagefilledarc ( $image, 75, 75, 70, 70, 0, -180, $gray, IMG_ARC_PIE );
23 $gamma = imagegammacorrect($image, 1, 5);
27 test_image_equals_file(__DIR__ . '/imagegammacorrect_basic.png', $image);
H A Dimagetruecolortopalette_basic.phpt15 $image = imagecreatetruecolor(150, 150);
17 $a = imagecolorallocate($image,255,0,255);
18 $b = imagecolorallocate($image,0,255,255);
20 $half = imagefilledarc ( $image, 75, 75, 70, 70, 0, 180, $a, IMG_ARC_PIE );
21 $half2 = imagefilledarc ( $image, 75, 55, 80, 70, 0, -180, $b, IMG_ARC_PIE );
23 var_dump(imagetruecolortopalette($image, true, 2));
26 test_image_equals_file(__DIR__ . '/imagetruecolortopalette_basic.png', $image);
H A Dfunc.inc81 echo "The expected image does not exist.\n";
118 * @param resource $image
121 function test_to_truecolor($image)
123 if (imageistruecolor($image)) {
124 return $image;
126 $width = imagesx($image);
127 $height = imagesy($image);
135 * Saves an actual image to disk.
140 * @param resource $image
143 function save_actual_image($image)
[all …]
H A Dimagerectangle_basic.phpt12 // Create a image
13 $image = imagecreatetruecolor( 100, 100 );
16 imagerectangle( $image, 0, 0, 50, 50, imagecolorallocate($image, 255, 255, 255) );
19 test_image_equals_file(__DIR__ . '/imagerectangle_basic.png', $image);
H A Dimagecreatetruecolor_error2.phpt12 $image = imagecreatetruecolor(-1, 30);
13 $image = imagecreatetruecolor(30, -1);
14 $image = imagecreatetruecolor(999999999999999999999999999, 30);
15 $image = imagecreatetruecolor(30, 999999999999999999999999999);
18 Warning: imagecreatetruecolor(): Invalid image dimensions in %s on line %d
20 Warning: imagecreatetruecolor(): Invalid image dimensions in %s on line %d
/PHP-7.4/ext/standard/tests/image/
H A Dgetimagesize_basic.phpt7 * Source code: ext/standard/image.c
52 -- GIF image file (200x100.gif) --
67 string(9) "image/gif"
87 string(10) "image/jpeg"
94 -- PNG image file (200x100.png) --
107 string(9) "image/png"
112 -- SWF image file (200x100.swf) --
141 string(9) "image/bmp"
157 string(10) "image/tiff"
197 string(9) "image/jp2"
[all …]
H A Dimage_type_to_mime_type_basic.phpt43 string(9) "image/gif"
44 string(10) "image/jpeg"
45 string(9) "image/png"
47 string(9) "image/psd"
48 string(9) "image/bmp"
49 string(10) "image/tiff"
50 string(10) "image/tiff"
52 string(9) "image/jp2"
55 string(9) "image/iff"
58 string(9) "image/xbm"
[all …]
H A Dimage_type_to_mime_type_variation3.phpt27 string\(9\) "image\/gif"
30 string\(10\) "image\/jpeg"
33 string\(9\) "image\/png"
39 string\(9\) "image\/psd"
42 string\(9\) "image\/bmp"
45 string\(10\) "image\/tiff"
48 string\(10\) "image\/tiff"
54 string\(9\) "image\/jp2"
66 string\(9\) "image\/iff"
72 string\(9\) "image\/xbm"
[all …]
H A Dimage_type_to_mime_type.phpt29 string(9) "image/bmp"
31 string(10) "image/webp"
33 string(9) "image/bmp"
35 string(9) "image/bmp"
37 string(9) "image/jp2"
41 string(10) "image/jpeg"
43 string(9) "image/gif"
49 string(9) "image/gif"
51 string(9) "image/iff"
53 string(9) "image/png"
[all …]
H A Dgetimagesize.phpt40 string(9) "image/bmp"
55 string(10) "image/webp"
70 string(9) "image/bmp"
85 string(9) "image/bmp"
102 string(9) "image/jp2"
136 string(10) "image/jpeg"
153 string(9) "image/gif"
200 string(9) "image/gif"
215 string(9) "image/iff"
230 string(9) "image/png"
[all …]
/PHP-7.4/ext/standard/tests/file/
H A Dbug69628.phpt21 file_put_contents("$dirname/image.jPg", '');
22 file_put_contents("$dirname/image.gIf", '');
23 file_put_contents("$dirname/image.png", '');
37 unlink("$file_path/bug69628/image.jPg");
38 unlink("$file_path/bug69628/image.gIf");
39 unlink("$file_path/bug69628/image.png");
46 string(%d) "%s/bug69628/image.gIf"
48 string(%d) "%s/bug69628/image.jPg"

Completed in 48 milliseconds

1234567891011