문제

정상 상태와 호버 상태를 포함하는 스프라이트를 만드는 다음 명령이 있습니다.

convert -background none -pointsize 11 -fill white -size 100x -gravity NorthWest caption:'Test' top.png
convert -background none -pointsize 11 -fill grey -size 100x -gravity SouthWest caption:'Test' bottom.png
montage top.png bottom.png -geometry +0+0 -tile 1x2 -background none test.png

Top.png 및 Bottom.png라는 두 개의 이미지를 만들어 Test.png를 만들기 위해 결합합니다.

상단 및 하단 이미지를 디스크에 쓸 필요 없이이 작업을 수행하는 방법이 있습니까?

명령을 함께 파이프 할 수 있습니까?

업데이트 : 솔루션

montage \
  <(convert -background none -pointsize 11 -fill white -size 100x -gravity NorthWest caption:'Test' png:-) \
  <(convert -background none -pointsize 11 -fill grey -size 100x -gravity SouthWest caption:'Test' png:-) \
  -geometry +0+0 -tile 1x2 -background none test.png
도움이 되었습니까?

해결책

이것은 완전히 테스트되지 않았으므로 테스트하기 전에 관련 이미지를 백업하십시오.

montage \
  <(convert -background none -pointsize 11 -fill white -size 100x -gravity NorthWest caption:'Test' png:-) \
  <(convert -background none -pointsize 11 -fill grey -size 100x -gravity SouthWest caption:'Test' png:-) \
  -geometry +0+0 -tile 1x2 -background none test.png

(이것은 ... 불리운다 "프로세스 대체")

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top