File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Testing imageflip() of GD library
3
+ --SKIPIF--
4
+ <?php
5
+ if ( ! extension_loaded ('gd ' ) || !function_exists ('imageflip ' )) die ( 'skip GD not present; skipping test ' );
6
+ ?>
7
+ --FILE--
8
+ <?php
9
+
10
+ $ im = imagecreatetruecolor ( 99 , 99 );
11
+
12
+ imagesetpixel ($ im , 0 , 0 , 0xFF );
13
+ imagesetpixel ($ im , 0 , 98 , 0x00FF00 );
14
+ imagesetpixel ($ im , 98 , 0 , 0xFF0000 );
15
+ imagesetpixel ($ im , 98 , 98 , 0x0000FF );
16
+
17
+ imageflip ($ im , IMG_FLIP_HORINZONTAL );
18
+ imageflip ($ im , IMG_FLIP_VERTICAL );
19
+ imageflip ($ im , IMG_FLIP_BOTH );
20
+
21
+
22
+ var_dump (dechex (imagecolorat ($ im , 0 , 0 )));
23
+ var_dump (dechex (imagecolorat ($ im , 0 , 98 )));
24
+ var_dump (dechex (imagecolorat ($ im , 98 , 0 )));
25
+ var_dump (dechex (imagecolorat ($ im , 98 , 98 )));
26
+ ?>
27
+ --EXPECT--
28
+ string(2) "ff"
29
+ string(4) "ff00"
30
+ string(6) "ff0000"
31
+ string(2) "ff"
You can’t perform that action at this time.
0 commit comments