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