<?php
GdImage|false imagecreatefromwebp( string $filename )
where,
$filename = The path to an existing WEBP image
?>
STREAM WRAPPERS | MEANING |
file:// | LOCAL File System |
http:// | URL HTTP |
ftp:// | URL FTP |
php:// | I/O streams |
zlib:// | Data Compression stream |
data:// | DATA (RFC-2397) |
glob:// | Find Filenames |
phar:// | PHP Archive |
ssh2:// | Secure Shell 2 |
rar:// | RAR |
ogg:// | Audio |
expect:// | Interaction of stream processes |
ed48 |
<?php
echo 'PHP VERSION: ' . PHP_VERSION . '<br><br>';
$img_file = "webp/WEBP 001 01.webp";
echo $img_file; ?><br><br>Existing Image
<br><br><img src="<?php echo $img_file; ?>" alt="<?php echo $img_file; ?>" title="W E B P">
<?php
$im01 = imagecreatefromwebp($img_file);
// var_dump($im01);
echo '<br><br>';
$img_name = "bmp/BMP 006 01 (webp2bmp).bmp";
$bool01 = imagebmp($im01, $img_name);
if ($bool01 == true)
{
echo 'The new format has been created!<br><br>' .
$img_name . '<br><br>';
echo '<img src="' . $img_name .
'" alt="' . $img_name . '" title="' . $img_name . '">';
}
else
{
echo '$bool01 = ' . $bool01 .
'<br><br>The image was NOT created!';
}
?>
<?php
echo 'PHP VERSION: ' . PHP_VERSION . '<br><br>';
$img_file = "webp/WEBP 0029 09.webp";
echo $img_file; ?><br><br>Existing Image
<br><br><img src="<?php echo $img_file; ?>" alt="<?php echo $img_file; ?>" title="W E B P">
<?php
$im02 = imagecreatefromwebp($img_file);
// var_dump($im02);
echo '<br><br>';
$img_name = "wbmp/WBMP 005 02 (webp2wbmp).wbmp";
$bool01 = imagewbmp($im02, $img_name);
if ($bool01 == true)
{
echo 'The new format has been created!<br><br>' .
$img_name . '<br><br>';
echo 'The image was Created...<br>
BUT CAN NOT BE DISPLAYED by this browser!';
}
else
{
echo '$bool01 = ' . $bool01 .
'<br><br>The image was NOT created!';
}
?>
<?php
echo 'PHP VERSION: ' . PHP_VERSION . '<br><br>';
$img_file = "webp/WEBP 005 02 P de Galinhas (bmp2webp).webp";
echo $img_file; ?><br><br>Existing Image
<br><br><img src="<?php echo $img_file; ?>" alt="<?php echo $img_file; ?>" title="W E B P" width="400">
<?php
$im03 = imagecreatefromwebp($img_file);
// var_dump($im03);
echo '<br><br>';
$img_name = "wbmp/WBMP 006 03 P de Galinhas (webp2wbmp).wbmp";
$bool01 = imagewbmp($im03, $img_name);
if ($bool01 == true)
{
echo 'The new format has been created!<br><br>' .
$img_name . '<br><br>';
echo 'The image was Created...<br>
BUT CAN NOT BE DISPLAYED by this browser!';
}
else
{
echo '$bool01 = ' . $bool01 .
'<br><br>The image was NOT created!';
}
?>