3
图片拼接马赛克图像-Tiler
source link: http://osp.io/archives/7903
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
图片拼接马赛克图像-Tiler – 开源派
Tiler是一款马赛克镶嵌画制作工具 。基于Python 开发, 遵守MIT开源协议。Tiler 制作的镶嵌画可以适应不同形状和大小的图块(不限于方块)。
使用方法:
图片放到images 目录下。
之后,选择需要镶嵌的图块。Tiler 自带多种图块,例如选择 圆点作为镶嵌图块,例如图块 tiles/dot
目录:
dot
├── dot.png
└── gen_at
dot.png
是图块的原始图片。gen_at
为图块目录,其中包含各种颜色的圆点。
在 tiler 目录中执行以下命令:
python tiler.py ./images/目标图片.png ./tiles/dot/gen_at/
完成后,tiler 目录中会生成 out.png
可使用默认配置如果需要可调整,可调大配置文件 tiler/conf.py
中 DEPTH
和 COLOR_DEPTH
的值。
DEPTH
:每种颜色的分区数,默认值 4。COLOR_DEPTH
:图片包含颜色的数量,默认值 32。
源码:https://github.com/nuno-faria/tiler
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK