xref: /PHP-8.0/ext/gd/tests/createfromgd2.phpt (revision 26dfce7f)
1--TEST--
2imagecreatefromgd2
3--SKIPIF--
4<?php
5        if (!function_exists('imagecreatefromgd2')) die("skip gd extension not available\n");
6?>
7--FILE--
8<?php
9$file = __DIR__ . '/src.gd2';
10
11$im2 = imagecreatefromgd2($file);
12echo 'test create from gd2: ';
13echo imagecolorat($im2, 4,4) == 0xffffff ? 'ok' : 'failed';
14echo "\n";
15
16$im3 = imagecreatefromgd2part($file, 4,4, 2,2);
17echo 'test create from gd2 part: ';
18echo imagecolorat($im2, 4,4) == 0xffffff ? 'ok' : 'failed';
19echo "\n";
20?>
21--EXPECT--
22test create from gd2: ok
23test create from gd2 part: ok
24