文件名称:gd-indexed-color-converter:将图像转换为索引颜色模式
文件大小:45KB
文件格式:ZIP
更新时间:2024-07-10 06:57:47
PHP
GDIndexedColorConverter 是一个简单的库,可将图像转换为模式。 使用索引颜色模式,可以仅用几种特定颜色显示图像。 为了实现图像抖动效果,GDIndexedColorConverter 使用 [Floyd–Steinberg dithering] ( ) 算法将每个像素的误差扩散应用到其相邻像素上。 要求 由于GDIndexedColorConverter用到了一些功能,所以需要在PHP配置文件( )中启用GD扩展。 用法 GDIndexedColorConverter 提供了一个名为convertToIndexedColor的函数来将图像转换为索引颜色模式,它接受三个参数(如下所列),并返回一个新的索引颜色模式的图像资源。 im (imageresource) GD 库函数创建的图像资源。 palette (数组)包含索引颜色模式图像将使用的所有特定颜色的
【文件预览】:
gd-indexed-color-converter-master
----src()
--------GDIndexedColorConverter.php(7KB)
----example()
--------example.php(1KB)
--------README.md(651B)
--------shell.jpg(38KB)
----LICENSE(1KB)
----README.md(3KB)
----.gitignore(20B)