python如何将一张图片贴到另一张图片的特定位置?

ClardyChan 2014-02-16 12:20:46
python如何将一张图片贴到另一张图片的特定位置?重点是特定位置,PIL.Image中paste可以贴到起始位置
...全文
2332 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
ClardyChan 2014-02-16
  • 打赏
  • 举报
回复
很好,我一直以为box是截取一张图的一部分贴在另一张图的起始位置
panghuhu250 2014-02-16
  • 打赏
  • 举报
回复
PIL文档: im.paste(image, box) Pastes another image into this image. The box argument is either a 2-tuple giving the upper left corner, a 4-tuple defining the left, upper, right, and lower pixel coordinate, or None (same as (0, 0)). If a 4-tuple is given, the size of the pasted image must match the size of the region. If the modes don’t match, the pasted image is converted to the mode of this image (see the convert method for details). box参数就是用来指定位置的。

37,720

社区成员

发帖
与我相关
我的任务
社区描述
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
社区管理员
  • 脚本语言(Perl/Python)社区
  • IT.BOB
加入社区
  • 近7日
  • 近30日
  • 至今

试试用AI创作助手写篇文章吧