mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
a375d54785
Cf. PR #6787. Closes GH-6994.
26 lines
551 B
PHP
26 lines
551 B
PHP
--TEST--
|
|
gif --> jpeg conversion test
|
|
--EXTENSIONS--
|
|
gd
|
|
--SKIPIF--
|
|
<?php
|
|
if (!function_exists("imagejpeg")) {
|
|
die("skip jpeg support unavailable");
|
|
}
|
|
if (!function_exists("imagecreatefromgif")) {
|
|
die("skip gif read support unavailable");
|
|
}
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
$cwd = __DIR__;
|
|
|
|
echo "GIF to JPEG conversion: ";
|
|
echo imagejpeg(imagecreatefromgif($cwd . "/conv_test.gif"), $cwd . "/test_gif.jpeg") ? 'ok' : 'failed';
|
|
echo "\n";
|
|
|
|
@unlink($cwd . "/test_gif.jpeg");
|
|
?>
|
|
--EXPECT--
|
|
GIF to JPEG conversion: ok
|