1 Star 0 Fork 0

KojimaNotGood/skin-color-transfer

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
cropper.py 530 Bytes
一键复制 编辑 原始数据 按行查看 历史
from PIL import Image
def crop(image):
"""
This function just takes a variable containing the name of the
image to be worked on, then using the fixed coordinates, crops
the image so that there wouldn't be any excess black on the
image any more and returns the name of the cropped image
"""
image_obj = Image.open(image)
# coords = (600, 600, 700, 1050)
coords = (400, 400, 706, 1050)
cropped = "cropped.png"
cropped_image = image_obj.crop(coords)
cropped_image.save(cropped)
return cropped
# crop("img_2.jpg")
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/noooToday/skin-color-transfer.git
[email protected]:noooToday/skin-color-transfer.git
noooToday
skin-color-transfer
skin-color-transfer
master

搜索帮助