나는이 생각 가까운, I로 시작하는 경우 :
#!/bin/bash
# Get x,y coordinates of centre
cx=$(convert bean.jpg -format "%[fx:int(w/2)]" info:)
cy=$(convert bean.jpg -format "%[fx:int(h/2)]" info:)
# Find point on circle circumeference
pt="0,$cy"
[ $cx -gt $cy ] && pt="$cx,0"
# Now create a black and white circle of the right size as transparency
convert bean.jpg \
\(+clone -fill black -colorize 100% -fill white -draw "circle $cx,$cy $pt" -alpha off \) \
-compose copyopacity -composite \
-trim +repage result.png
당신은 할 경우 V7은, 미친 사물을 보는 것처럼, 당신이 한 줄에 모든 것을 할 수있는 ImageMagick이 : ImageMagick이 7, 당신이 할 수에서 마크 Setchell의 좋은 코드를 약간 수정,
magick bean.jpg \
\(+clone -fill black -colorize 100% -fill white -draw "circle %[fx:int(w/2)],%[fx:int(h/2)] %[fx:w>h?int(w/2):0],%[fx:w>h?0:int(h/2)]" -alpha off \) \
-compose copyopacity -composite \
-trim +repage result.png
그것은 김프로 해 드리겠습니다,하지만 가능성이 훨씬 쉬워 ImageMagick. 태그에 추가하여 적합한 사람들의 관심을 끌 수 있습니다. – xenoid
추가됨. 방향에 진심으로 감사드립니다. – wesleywmd
예제 이미지를 게시하여 수행하려는 작업을 볼 수 있습니까? Imagemagick에서는 mogrify 명령을 사용하여 전체 이미지 폴더를 처리 할 수 있습니다. – fmw42