xref: /PHP-8.3/ext/gd/tests/xbm2png.phpt (revision a375d547)
1--TEST--
2xbm --> png conversion test
3--EXTENSIONS--
4gd
5--SKIPIF--
6<?php
7    if (!function_exists("imagepng")) {
8        die("skip png support unavailable");
9    }
10    if (!function_exists("imagecreatefromxbm")) {
11        die("skip xbm read support unavailable");
12    }
13?>
14--FILE--
15<?php
16    $cwd = __DIR__;
17
18    echo "XBM to PNG conversion: ";
19    echo imagepng(imagecreatefromxbm($cwd . "/conv_test.xbm"), $cwd . "/test_xbm.png") ? 'ok' : 'failed';
20    echo "\n";
21
22    @unlink($cwd . "/test_xbm.png");
23?>
24--EXPECT--
25XBM to PNG conversion: ok
26