Tool Quick Reference – libvips
What is libvips?
Section titled “What is 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.
What can it do?
Section titled “What can it do?”- 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).
Simple examples
Section titled “Simple examples”Make a web‑ready, zoomable version from a large TIF:
vips dzsave big_slide.tif slide-output --suffix .jpg# Produces slide-output.dzi + a folder of tilesMake a smaller copy (25% of original size):
vips resize big_slide.tif small_slide.tif 0.25Crop out a box (coordinates provided by your tech person):
vips crop big_slide.tif crop.tif 1000 2000 2000 2000When would a clinician want this?
Section titled “When would a clinician want this?”- You want slides on a website that feel like a digital scanner.
- You want a clean teaching image from a large slide.
- Your normal viewer is slow or freezes with large files.
- 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.
Install (for IT/tech person)
Section titled “Install (for IT/tech person)”Ubuntu/Debian:
sudo apt updatesudo apt install libvips-toolsvips --versionFedora:
sudo dnf install vips-tools # or: sudo dnf install vipsvips --versionArch/Manjaro:
sudo pacman -Syusudo pacman -S libvipsvips --version