Command Line Magic on Nostr: Often I'm wanting to take original photos and resize them for sharing purposes. You ...
Often I'm wanting to take original photos and resize them for sharing purposes. You can use a bash for loop and the convert program from ImageMagick to do this:
mkdir smaller && for i in *.jpg ; do convert -quality 70 "$i" -resize 40% "smaller/$i" ; echo "$i" ; done
ImageMagick also has a mogrify program for doing this to the images in place, but I usually like to make new images in case I make a mistake I can just run it again.
mkdir smaller && for i in *.jpg ; do convert -quality 70 "$i" -resize 40% "smaller/$i" ; echo "$i" ; done
ImageMagick also has a mogrify program for doing this to the images in place, but I usually like to make new images in case I make a mistake I can just run it again.