mion/dither

一个小型库,用于将全彩图像转换为抖动图像。

0.0.1 2022-04-18 10:54 UTC

This package is auto-updated.

Last update: 2024-09-18 16:15:21 UTC


README

一个小型库,用于将全彩图像转换为抖动图像。

安装

在您的composer.json中要求mion/dither包并更新您的依赖项

composer require mion/dither

用法

use Dither\Dither;

$image = imagecreatefrompng('demo.png');

$dither = new Dither;
$dither->setPalette(['#000000', '#FFFFFF', '#00FF00', '#0000FF', '#FF0000', '#FFFF00', '#FF8000']);
$output = $dither->process($image, 800, 600);

关于Mion

Mion是一家软件解决方案初创公司,专注于为自2016年9月在广州成立的小微企业提供一体化企业解决方案。

许可证

本软件根据MIT许可证(MIT)发布。