Z652 Digital Libraries, Fall 2022, Section 3874

A course on digital libraries and building digital collections.

View the Project on GitHub jawalsh/z652-Digital-Libraries

imagemagick

Some sample image commands

get image file information

convert from tiff to jpeg

scale image

make grayscale

resize image

crop image

scale and crop image

modify brightness, saturation, hue

The above command increases brightness 150%. To decrease brightness, use values less than 100.

The 3 numbers represent: brightness, saturation, and hue. They are all interpreted as percentages.

add border

Lab

  1. Download sample image file: http://ella.slis.indiana.edu/~jawalsh/teaching/z652/sample_images.zip
  2. Run some imagemagick commands to convert your tiff files to 3 different sizes of jpg files:
    • a “large” file that is 1000 pixels long on its longest side
    • a “medium” file that 500 pixels long on its longest side
    • a “thumbnail” file that is 200 pixels long on its longest side
  3. Use imagemagick to rotate the rotate_left.tiff and rotate_right.tiff images.
  4. Use imagemagick to crop the comics.tif images so you have an image file with just the title panel:
    • Samson and David title panel
  5. Spend a few minutes experimenting with the commands above, then review the documentation at https://www.imagemagick.org/script/command-line-processing.php and https://www.imagemagick.org/script/command-line-tools.php and explore some commands on your own. You might also try searching the internet for things like “imagemagick watermark” for instructions on how to use imagemagick to put a watermark on your images. Or try one of these short tutorials: