Skip to content

Instantly share code, notes, and snippets.

@kaylarose
Created July 31, 2012 19:12
Show Gist options
  • Save kaylarose/3219623 to your computer and use it in GitHub Desktop.
Save kaylarose/3219623 to your computer and use it in GitHub Desktop.
ImageMagick Snippets
# Add 10px of transparency canvas to all PNGs in this dir - renamed padded-ORIGNAME.png
`convert *.png -matte -bordercolor none -border 10 -set filename:fname '%t' 'padded-%[filename:fname].png'`
# Compress JPEGs at desired quality (1-100)
`convert *.jpg -quality 85 -set filename:fname '%t' 'compressed-%[filename:fname].jpg'`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment