Image Editors

GIMP, The

  • X11
  • Like PhotoShop
  • Creating a GIF animation with variable delay
  • Open PNG image   # First frame
  • File -> Open as layer*    # For each additional PNG image
  • Dialogs -> Layers -> Double click on each image, change the name to "... (XXXmsec)"
  • Save -> ... .gif -> Save as animation
  • [x] Loop forever
  • Delay: xxx (will be overridden by variable delay specified above)
  • Frame disposal: Replace

ImageMagick

  • Freeware
  • Like Paint Shop Pro
  • Awkward, primitive GUI
  • Powerful command-line utilities
mogrify -format png *.gif                             # Convert all .gif files to .png
convert -background "#ffffff" -flatten <file> <file> # Flatten the image with a white background
mogrify -border 2x2 -bordercolor "#000000" *.jpg # Add 2-pixel border on all sides
mogrify -gravity southeast -chop 12x12 *.jpg # Trim 12 pixels from the right and bottom sides
mogrify -rotate 90 -compress JPEG -quality 85 <file> # Rotate a .jpg image 90 degrees clockwise

# Resize all .jpg files in the current directory to fit within 640 x 640
for file in *.jpg; do mogrify -resize 640x640> -compress JPEG -quality 75 "$file"; done

# Trim 7 pixels from all sides (note: this leaves the image at an offset when it's opened in GIMP)
for file in *.jpg; do convert -shave 7x7 "$file" "$file"; done