close
<?php
// 對於這個例子,我們需要前的圖像尺寸
$image = getimagesize('./test.gd2');
// 現在創建圖像的實例,我們得到了圖像
// sizes
$im = imagecreatefromgd2part('./test.gd2', 4, 4, ($image[0] / 2) - 6, ($image[1] / 2) - 6);
// Do an image operation, in this case we emboss the
// image if PHP 5+
if(function_exists('imagefilter'))
{
imagefilter($im, IMG_FILTER_EMBOSS);
}
// Save optimized image
imagegd2($im, './test_emboss.gd2');
imagedestroy($im);
?>
全站熱搜