How to crop analog images on Ubuntu with imagemagick

Recently, I’ve developed a couple of analog photos and afterwards scanned them. After Scanning them, their size were not properly adjusted yet, cause during the scanning process it created a big empty white space.

An option would have been to crop every picture by hand with Gimp, but since I had a couple of more pictures, I thought it would make sense to use a more automated process.

I knew that it’s possible to manipulate images with imagemagick before already, but I wasn’t sure if cropping will work.
Luckily I found out that it’s the case and below I’ll show how to actually do it.

Installing imagemagick

sudo apt-get update
sudo apt-get install imagemagick

Cropping images

Switch to the directory where your image is located and adjust the -crop geometry options as described in the imagemagick documentation.

cd <image_directory>
for image in `ls`; do `convert -crop 801x1164+0+0 $image $image-convert.jpg`; done

An example output image for me looks like this:

.