私は2つの画像を持っています。私はそれを操作するための.shファイルを作成しました。まず、そのために for ループを使用します。
私のディレクター構造: -
test image doc newimage angelimage test.sh 5elements10.png Boltonclinics5.png
今、私は2つの画像を3rd.pngの両方で合成し、newimageに保存した後、 newimageフォルダー内の画像を特定の天使に変換したい. だから私はコードで試します
#!/bin/bash
for f in $( ls *.png ); do
composite -gravity center $f ./doc/back.png ./newimage/new$f
done
for f in `ls ./newimage`; do
convert $f -rotate -7 ./angelimage/ang$f
done
今、私は for ループが適切に動作することを発見しましたが、2番目のループは次のようなエラーを出します
convert: unable to open image `new-5elements10.png': @ error/blob.c/OpenBlob/2587.
convert: unable to open file `new-5elements10.png' @ error/png.c/ReadPNGImage/3234.
convert: missing an image filename `new-5elements10.png' @ error/convert.c/ConvertImageCommand/3011.
convert: unable to open image `new-boltonclinics5.png': @ error/blob.c/OpenBlob/2587.
convert: unable to open file `new-boltonclinics5.png' @ error/png.c/ReadPNGImage/3234.
convert: missing an image filename `new-boltonclinics5.png' @ error/convert.c/ConvertImageCommand/3011.