I have a file with the full path to an image on each line, all are jpg. I want to resize every image/line in the file to 1024px in width, while keeping the aspect ratio for the height. I simply want to overwrite the original file.
The main thing I'm having issue with is, I want to SHRINK only. I do not want to enlarge images smaller than 1024px in width up to 1024px in width.
Here is the bash script I'm working with and just need help with the convert line as I have no experience with imagemagick.
#!/bin/bash
while read p; do
convert $p
done < listofimages