PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<imagesyimagettfbbox>
Last updated: Mon, 16 Jul 2012

imagetruecolortopalette

(PHP 4 >= 4.0.6, PHP 5)

imagetruecolortopalette -- 将真彩色图像转换为调色板图像

说明

void imagetruecolortopalette ( resource image, bool dither, int ncolors )

imagetruecolortopalette() 将一幅真彩色图像转换为调色板图像。本函数的代码原本是从独立的 JPEG 小组库代码中提取出来的,非常出色。此代码被修改以在结果调色板中保留尽可能多的 alpha 通道信息以及尽可能多的颜色。但并没有达到期望的效果。通常最好生成真彩色图像输出,这样可以保证得到最高的输出质量。

dither 指明图像是否被抖动(dithered),如果为 TRUE 则图像将被抖动使图像中的斑点更多但是颜色更接近。

ncolors 设定调色板中被保留的颜色的最大数目。

注: 本函数添加于 PHP 4.0.6 且需要 GD 2.0.1 或更高版本。




<imagesyimagettfbbox>
 Last updated: Mon, 16 Jul 2012
 
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://manual.phpv.net/
Last updated: Thu Jul 7 19:13:47 2005 CST