Skip to content

Instantly share code, notes, and snippets.

@itsliamjones
Created February 16, 2023 12:57
Show Gist options
  • Save itsliamjones/bae432ac858742e84129a1475896a8cc to your computer and use it in GitHub Desktop.
Save itsliamjones/bae432ac858742e84129a1475896a8cc to your computer and use it in GitHub Desktop.
Bulk create square thumbnails from images with ImageMagick, trim but no crop
convert -define png:size=200x200 *.* \
-trim -quality 100 \
-thumbnail '128x128>' \
-background white -gravity center -extent 128x128 \
-set filename:base "%[basename]" "resized/%[filename:base].png"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment