Cropping, resizing and converting

Cropping, resizing and converting#

Let’s say you have a bunch of screenshots like this one:

Terminal window with decorations

You want to get rid of everything except the text area in the middle. By selecting that region in GIMP you’ve established that it’s 729 pixels wide by 434 pixels tall and starts 0 pixels from the left side and 54 pixels below the top. You then want to resize it to 50% in both the X and Y directions to make it a quarter–size image. ImageMagick’s mogrify can do both changes in a single command:

 

This page is a preview of The newline Guide to Bash Scripting

No discussions yet