Skip to content

Instantly share code, notes, and snippets.

@safecat
Created May 10, 2014 09:19
Show Gist options
  • Save safecat/256832539df27d2144e1 to your computer and use it in GitHub Desktop.
Save safecat/256832539df27d2144e1 to your computer and use it in GitHub Desktop.
Trim image with Imagemagick
# based on http://stackoverflow.com/questions/23577931/get-offset-from-imagemagick-trim/23578928?noredirect=1#23578928
convert -debug Coder longyan_1.png -trim longyan_1.trimed.png 2>&1 | sed -n '/Setting up oFFs chunk/ s/.*x=/x=/p'
# x=181, y=118, units=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment