xref: /php-src/ext/gd/tests/xpm2png.phpt (revision a375d547)
1--TEST--
2xpm --> 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("imagecreatefromxpm")) {
11        die("skip xpm read support unavailable");
12    }
13?>
14--FILE--
15<?php
16    $cwd = __DIR__;
17
18    echo "XPM to PNG conversion: ";
19    echo imagepng(imagecreatefromxpm($cwd . "/conv_test.xpm"), $cwd . "/test_xpm.png") ? 'ok' : 'failed';
20    echo "\n";
21
22    @unlink($cwd . "/test_xpm.png");
23?>
24--EXPECT--
25XPM to PNG conversion: ok
26