有没有一个脚本可以在python中裁剪gif,比如这个页面:https://www.iloveimg.com/crop-image?在
不久前,我发现了Image Cropping using Python,但问题是需要用光标绘制矩形。在
我需要一个像https://www.iloveimg.com/crop-image这样的图形用户界面,它有一个矩形,可以移动到任何我想要的地方:
请看https://www.iloveimg.com/crop-image将GIF裁剪成新的动画。并且Image Cropping using Python只裁剪GIF的第一帧。在
我可以使用的一些模块有:
在阅读了一些教程之后,我想出了一个解决方案:
你把你的文件名放在一个
ImageCutter
实例中,它将绘制第一帧,让你用鼠标选择一个框,它定义了要裁剪的区域。定义区域后,单击图像中的某个位置,程序会将裁剪后的gif保存在工作文件夹中。在您可以使用自己的
Rectangle
,而不是小部件相关问题 更多 >
编程相关推荐