Language Selection

English French German Italian Portuguese Spanish

Cropping multiple images the same way

Filed under

Sometimes you'll want to crop the same area from multiple images (think of taking the contents of the same window from a load of screenshots). Of course, you could fire up your favourite image editor to select and crop over and over, but, as usual, there is a better way. This short tutorial describes an efficient way to do this for a theoretically infinite amount of images.

Difficulty: Basic - Medium

This tutorial assumes basic Linux knowledge, like starting a program, opening a terminal and working with a terminal.

The tools we'll be using are GIMP and mogrify (from the ImageMagick suite), so make sure that you have them installed. We'll use GIMP to graphically select the area to be cropped and the mogrify tool to automate the cropping, saving us a lot of work. Let's start with the selecting:

Getting the right cropping values using GIMP. We now have the values we need to tell the mogrify utility what to crop. Let's go on and write a line that'll execute mogrify in such a way that it'll crop all our images!

Now we'll start working in the terminal.

More in Tux Machines

Today in Techrights

Android Leftovers

Top 7 Linux GPU Monitoring and Diagnostic Commands Line Tools

A video card is a special circuit board that controls what is displayed on a computer monitor. It is also called a graphics processing unit (GPU), which calculates 3D images and graphics for Linux gaming and other usages. Let us see the top 7 Linux GPU monitoring and diagnostic command-line tools to solve issues. The following tools work on Linux for GPU monitoring and diagnostic purposes and other operating systems such as FreeBSD. The majority of Linux and FreeBSD users these days use Nvidia, Intel, and AMD GPUs. Read more

Ubuntu Linux maker Canonical publishes curated container images to help secure software supply chains

A good deal of software development now relies on open source images, but it can be hard for businesses to know if they're introducing security flaws by using them. Canonical -- the company behind Ubuntu Linux -- is addressing this by publishing the LTS (Long Term Support) Docker Image Portfolio, a curated set of secure container application images, on Docker Hub. LTS Images are built on trusted infrastructure, in a secure environment, with guarantees of stable security updates. Canonical and Docker will collaborate on Docker Official Images and the LTS Docker Image Portfolio to bring the best of the two to the community and ecosystem. The entire LTS Docker Image Portfolio will also be exempted from per-user rate limits. Read more