Linux Format

IMAGE CONVERTER Imgp

Version: 2.9 Web: https://github.com/jarun/imgp

-

There are plenty of image editors that can resize or rotate images. You can even find CLI utilities that can batch-process several images at once, and Imgp is one of them.

It is available in the official repos of most distros, but chances are it’s an old release. The project puts out DEB and RPM binaries for popular distros, but these weren’t available for the latest version at time of writing. Installing it from source isn’t much trouble, though. Begin by making sure you have the Pillow Python imaging library. You can either grab it from your distro’s package manager or via Python’s Pip package manager with pip3 install pillow .

Once you have the library, grab the source code for the latest release from the project’s download page and extract it with unzip v2.9.zip . Now change into the extracted directory and compile the utility with sudo make install .

You can use the Imgp utility to resize images by percentage or resolution, rotate them clockwise or anticlockw­ise by specific angles, brute-force resolution­s, convert PNG to JPEG (and vice versa), erase EXIF metadata from the images, and more. For instance, the following resizes an image to 1024x768:

$ imgp -x 1024x768 20191209_144408.jpg 20191209_144408.jpg

4608x3456 -> 1024x768

2278111 bytes -> 216967 bytes

1 processed in 0.5645 seconds.

The resized image has the name of the original with the added _IMGP suffix. By default, it does not process files with the _IMGP suffix. Use the -w switch to replace the original. The following resizes (-x) and replaces (-w) all image files (-r) in the current directory that are at least 50KB in size, keeping their orientatio­n (-a) in mind:

$ imgp -wrax 1024x768 -s 51200

Visit the utility’s website for more usage examples.

 ?? ?? Unless you point Imgp to a particular file or directory, it works on all the images it finds in the current directory.
Unless you point Imgp to a particular file or directory, it works on all the images it finds in the current directory.

Newspapers in English

Newspapers from Australia