python3图片横向拼接(雪碧图制作)
使用python快速将序列图集转为雪碧图
注意事项:
图片输出输出格式
部分经过压缩软件压缩的图片合成后回损失透明通道,尽量使用原图合并
源码如下:
from os import listdir
from PIL import Image
path = 'xxxxx'//目录地址
dirs = listdir(path)
ims = [Image.open(('%s/%s' % (path, fn))) for fn in sorted(dirs) if fn.endswith('.jpg')]
原创
2020-12-26 20:39:54 ·
680 阅读 ·
0 评论