I developed this simple bash script:
#!/bin/bash
for img in `find ./to_upload -iname "*.jpg" -type f`
do
mogrify ‑resize 1024 ‑sample 70 ${img}
done
When I run it, the script return:
...
mogrify: unable to open image `‑resize': No such file or directory @ error/blob.c/OpenBlob/2658.
mogrify: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
mogrify: unable to open image `1024': No such file or directory @ error/blob.c/OpenBlob/2658.
mogrify: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
mogrify: unable to open image `‑sample': No such file or directory @ error/blob.c/OpenBlob/2658.
mogrify: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
mogrify: unable to open image `70': No such file or directory @ error/blob.c/OpenBlob/2658.
mogrify: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
...
for each file. What is wrong? I am using debian testing.
It is not the script:
$ mogrify ‑resize 1024 ‑sample 70 image.jpg
mogrify: unable to open image `‑resize': No such file or directory @ error/blob.c/OpenBlob/2658.
mogrify: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
mogrify: unable to open image `1024': No such file or directory @ error/blob.c/OpenBlob/2658.
mogrify: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
mogrify: unable to open image `‑sample': No such file or directory @ error/blob.c/OpenBlob/2658.
mogrify: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
mogrify: unable to open image `70': No such file or directory @ error/blob.c/OpenBlob/2658.
mogrify: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
I am using gnome terminal. I do not understand maybe is it a debian bug?
mogrify -resize 1024 -sample 70 image.jpg
mogrify ‑resize 1024 ‑sample 70 image.jpg
I solved but I do not understand why, the first line works but the second line does not work. Please can someone try (copy-paste in command line)?