I have so many different images in a directory with sequential names 1 2 3 4 ... I was wondering if it was possible to convert all of them to jpg and resize them all to 900x900 without preserving aspect ratio.
What I tried for the first part is:
$ mogrify -format jpg -- *
But when I do this memory usage increases so quickly and then the process in killed. What I tried for resizing is:
$ mogrify -resize 900x900 -- *
mogrify: insufficient image data in file `109.jpg' @ error/jpeg.c/ReadJPEGImage/1039.
mogrify: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
mogrify: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
mogrify: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
mogrify: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
As I've said the names of the files are sequential numbers. I also have the following:
$ file * | grep -Po "^\d*: *\K[^:,]*(?=,)" | sort | uniq
ASCII text
GIF image data
JPEG image data
PNG image data
So What is the problem? How can I fix it?