close
<?php
// 創建一個空圖像並在其上加入一些文字
$im = imagecreatetruecolor(120, 20);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, 'WebP with PHP', $text_color);
// 保存圖像
imagewebp($im, 'php.webp');
// 釋放內存
imagedestroy($im);
?>
全站熱搜