Question

Je les commandes suivantes qui créent une image-objet contenant un état normal et un état de vol stationnaire:

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

Je crée deux images, top.png et bottom.png puis les combiner pour créer test.png.

Est-il possible de le faire sans avoir à écrire en haut et en bas des images sur le disque?

Puis-je conduit les commandes ensemble d'une façon?

Mise à jour: Solution

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
Était-ce utile?

La solution

complètement non testé, alors assurez-vous de sauvegarder les images pertinentes avant le test:

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

(Ceci est appelé « processus Remplacement « )

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top