Skip to content

Tool Quick Reference – libvips

libvips is a command‑line tool for working efficiently with very large images.

Clinician analogy:

Think of it like an automatic tissue processor for images. Instead of processing the entire slide at once, it works on just the small area it needs at each step—so it stays fast, even for whole‑slide images. You run it using the vips command.

  • Prepare slides for zoomable web viewing (e.g., with OpenSeadragon).
  • Make smaller copies for teaching decks.
  • Cut out regions of interest without opening a heavy viewer.
  • Convert between formats (e.g., TIF → JPG/PNG).

Make a web‑ready, zoomable version from a large TIF:

Terminal window
vips dzsave big_slide.tif slide-output --suffix .jpg
# Produces slide-output.dzi + a folder of tiles

Make a smaller copy (25% of original size):

Terminal window
vips resize big_slide.tif small_slide.tif 0.25

Crop out a box (coordinates provided by your tech person):

Terminal window
vips crop big_slide.tif crop.tif 1000 2000 2000 2000
  1. You want slides on a website that feel like a digital scanner.
  2. You want a clean teaching image from a large slide.
  3. Your normal viewer is slow or freezes with large files.
  4. You’re building a teaching site or portfolio with WSI images.

In short: clinicians rarely run libvips themselves—but it’s the behind‑the‑scenes tool your technical collaborator uses to turn raw slides into web/teaching‑friendly images.

Ubuntu/Debian:

Terminal window
sudo apt update
sudo apt install libvips-tools
vips --version

Fedora:

Terminal window
sudo dnf install vips-tools # or: sudo dnf install vips
vips --version

Arch/Manjaro:

Terminal window
sudo pacman -Syu
sudo pacman -S libvips
vips --version