Basic navigation
// move to a folder (change directory):
cd /Users/Liz/photos/
// list files in current folder:
ls
Image manipulation
These snipets use image magick to manipulate, convert and dither images
convert png to jpg
// single image:
magick image.jpg image.png
// batch process all images in a folder:
magick mogrify -format jpg *.png
resize images
note that this command will fit the resized image in the given dimensions, so that the image is at the largest 1500px or at the highest 2000px while keeping the orginal aspect ratio.
// single image:
magick image.jpg -resize 1500x2000 -quality 100 image.jpg
// batch process all images in a folder:
magick mogrify -resize 1500x2000 -quality 100 *.jpg
resize and dither
// single image:
magick convert image.jpg -colorspace Gray -ordered-dither o8x8 image-low.jpg
// batch process all images in a folder:
magick convert '*.jpg' -set filename:f "%t" -resize 800x1000 -quality 100 -colorspace Gray -ordered-dither o8x8 '%[filename:f]-low.jpg'