php imageantialias
imageantialias(PHP 4 >= 4.3.2, PHP 5)
描述
布尔imageantialias($sourc,$bool)
激活的行反走样快速绘制方法和有线多边形。它不支持阿尔法组件。它可以使用直接混合操作。但它只能在真彩色图像。
厚度和风格不支持。
使用透明背景颜色抗锯齿原语可以结束一些意想不到的结果。混合方法使用任何其他颜色的背景颜色。阿尔法组件的支持,缺乏不允许一个字母为基础的抗锯齿方法
图片
图像资源,通过创造的图像功能,如,一返回imagecreatetruecolor()。
启用
是否启用抗锯齿与否。
返回值
返回TRUE,成功或失败则返回FALSE
<?php // Setup an anti-aliased image and a normal image $aa = imagecreatetruecolor(400, 100); $normal = imagecreatetruecolor(200, 100); // Switch antialiasing on for one image imageantialias($aa, true); // Allocate colors $red = imagecolorallocate($normal, 255, 0, 0); $red_aa = imagecolorallocate($aa, 255, 0, 0); // Draw two lines, one with AA enabled imageline($normal, 0, 0, 200, 100, $red); imageline($aa, 0, 0, 200, 100, $red_aa); // Merge the two images side by side for output (AA: left, Normal: Right) imagecopymerge($aa, $normal, 200, 0, 0, 0, 200, 100, 100); // Output image header('Content-type: image/png'); imagepng($aa); imagedestroy($aa); imagedestroy($normal); ?>
永久地址:http://www.phprm.com/function/imageantialias.html
转载随意~请带上教程地址吧^^