File manager - Edit - /opt/alt/tests/alt-php84-pecl-vips_1.0.13-1.el8/tests/016.phpt
Back
--TEST-- new_from_array has optional scale and offset --SKIPIF-- <?php if (!extension_loaded("vips")) print "skip"; ?> --FILE-- <?php $image = vips_image_new_from_array([1, 2, 3]); $scale1 = vips_image_get($image, "scale")["out"]; $offset1 = vips_image_get($image, "offset")["out"]; $image = vips_image_new_from_array([1, 2, 3], 8); $scale2 = vips_image_get($image, "scale")["out"]; $offset2 = vips_image_get($image, "offset")["out"]; $image = vips_image_new_from_array([1, 2, 3], 8, 12); $scale3 = vips_image_get($image, "scale")["out"]; $offset3 = vips_image_get($image, "offset")["out"]; if ($scale1 == 1 && $offset1 == 0 && $scale2 == 8 && $offset2 == 0 && $scale3 == 8 && $offset3 == 12) { echo "pass"; } ?> --EXPECT-- pass
| ver. 1.4 |
Github
|
.
| PHP 8.2.30 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings