JosefJezek
6/17/2013 - 9:14 AM

How to ImageMagick

How to ImageMagick

How to ImageMagick

Install on Ubuntu

sudo apt-get install imagemagick

Usage

Replace color in a gif file

# Show colors used in image
identify -verbose image.gif

# Replace color #000 with #fff
convert image.gif -fill "#fff" -opaque "#000" image2.gif

Resize

#!/bin/sh
mkdir small

for f in `find . -maxdepth 1 -type f -name "*.JPG"` ; do
  filename=$(basename $f)
  convert $filename -resize 2000x small/$filename
done

# mogrify -path small -define jpeg:extent=2MB *

Resources