Skip to content

Instantly share code, notes, and snippets.

@srdjan-m
Last active June 7, 2016 13:25
Show Gist options
  • Save srdjan-m/02d4edb562fe742f418051f928db08bd to your computer and use it in GitHub Desktop.
Save srdjan-m/02d4edb562fe742f418051f928db08bd to your computer and use it in GitHub Desktop.
imagemagick: various commands
// Change canvas size (resize canvas to 48x48 pixels)
convert input.png -gravity center -background transparent -extent 48x48 output.png
// Resize
convert img1.png -resize 400x300 img2.png
// Resize by height only:
convert img1.png -resize x300 img2.png
// width_x_height_+_leftoffset_+_topoffset_
convert img1.png -crop 500x500+500+0 img2.png
// Get image info...
identify img.png
// Konvertuj u 555 RGB (za ICE)
convert image.gif +dither -colors 256 -define bmp:bit-depth=5 image.bmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment