首页 > 请教 python 有没有拼图的模块

请教 python 有没有拼图的模块

我想在服务器端实现一个功能,新建一个画布,然后打开N张图片,依次叠加到画布上,最后生成一张整的图片。
其中要满足:
1. 可以对图片进行旋转、缩放、定位
2. 图片的定位、旋转、缩放都基于自己的中心点

在前端有个fabric.js可以做到,不知道python有没有类似的?


python 处理图片的基础模块是这个 Pillow
文档地址:pillow document

安装方法 Windows,Linux, Mac OX 各种坑。

Debian/Ubuntu

pip uninstall Pillow or pip uninstall PIL
sudo apt-get install libjpeg-dev
pip -l install Pillow

Redhat/CentOS

pip uninstall Pillow or pip uninstall PIL
sudo yum install libjpeg-devel
pip -l install Pillow

Mac OX
brew install libjpeg
pip install -I pillow
【热门文章】
【热门文章】