Install libvips Utilities on Ubuntu 26.04

Install libvips Utilities on Ubuntu 26.04

The libvips is a fast and lightweight image-processing library designed for handling large images with low memory usage. It provides a set of command-line utilities for inspecting, editing, resizing, and converting images. This tutorial demonstrates how to install libvips utilities on Ubuntu 26.04.

Install libvips Utilities

Start by updating the package lists:

sudo apt update

Install the libvips utilities using the command:

sudo apt install -y libvips-tools

After installation, verify that the main utilities are available by checking their installed versions:

vips --version
vipsedit --version
vipsheader --version

Testing libvips Utilities

Download a sample image for testing:

curl -sSo test.jpg https://raw.githubusercontent.com/opencv/opencv/master/samples/data/butterfly.jpg

Use the vips resize command to create a smaller copy of the image. The 0.5 scale factor reduces both the width and height by half:

vips resize test.jpg result.jpg 0.5

The generated result.jpg file confirms that libvips utility can successfully read the source image, process it, and write the resized output.

Uninstall libvips Utilities

To remove the libvips utilities and clean up packages that are no longer needed, execute the following command:

sudo apt purge --autoremove -y libvips-tools

Leave a Comment

Cancel reply

Your email address will not be published.