Invalid argument for option "-resize" in shell script

I encoded the following shell script in a shell that creates a folder in a directory, then moves all the images to that directory, and then converts them and puts them in the folder before. if I do this process manually, it works fine, but apparently there is a conflict between the "convert" command and my loop. A β€œlarge” folder is one that will save images with their original sizes, and then the tabloid folder will contain the same image formats as thumbnails.

cd tabloid mkdir big mv * big cd big for i in 00 01 02 03 04 05 06 07 08 09 10 11 do convert -resize 351Γ—383 "$i.jpg" "../$i.jpg" done 

it returns the following error:

 convert.im6: invalid argument for option `-resize': 351Γ—383 @ error/convert.c/ConvertImageCommand/2382. 

I do not know what could be wrong with my script. apparently this is in a loop, because if I do the process manually (converting the image to the image through the terminal), it works fine.

+5
source share
1 answer

This is not ASCII x ( 0x78 ) in your conversion string Γ— ( MULTIPLICATION SIGN 0xd7 ).

+8
source

Source: https://habr.com/ru/post/1206408/


All Articles