ice*_*man 41 image-manipulation image crop os-agnostic
是否有任何轻量级命令行批量图像裁剪工具(Linux或Windows)可以处理各种格式?
小智 54
在Linux中你可以使用
mogrify -crop {Width}x{Height}+{X}+{Y} +repage image.png
Run Code Online (Sandbox Code Playgroud)
用于CLI图像处理
Kla*_*aus 44
Imagemagick的转换为我做了伎俩(而不仅仅是裁剪):
convert -crop +100+10 in.jpg out.jpg
Run Code Online (Sandbox Code Playgroud)
从左边框开始裁剪100像素,从顶部开始裁剪10像素.
convert -crop -100+0 in.jpg out.jpg
Run Code Online (Sandbox Code Playgroud)
庄稼右侧100像素,依此类推.Imagemagick网站了解更多:
http://www.imagemagick.org/Usage/crop/#crop
axe*_*l_c 29
Imagemagick是你想要的 - 尝试过和真实.
小智 6
for f in final/**/*;
do
convert -crop 950x654+0+660 "$f" "${f%.jpg}".jpg
done
Run Code Online (Sandbox Code Playgroud)
该脚本循环遍历所有子文件夹并裁剪 .jpg 文件。