Sign inSign up

makidaisuke/vips-tools-static

By makidaisuke

•Updated 8 months ago

Portable libvips CLI tools — no runtime dependencies required

Image
Developer tools
0

811

makidaisuke/vips-tools-static repository overview

⁠Portable & Statically Linked Vips Tools for Linux

Build statically-linked, portable libvips⁠ command-line tools (v8.18.0) for Linux — no runtime dependencies required.

⁠Overview

This project uses Docker to statically link libvips tools on Alpine Linux 3.23, generating standalone binaries with minimal dependencies. The generated binaries operate independently of the libc and can run on most Linux environments as is.

⁠Output Binaries

The following vips command-line tools are built:

  • vips — General-purpose image processing command
  • vipsthumbnail — High-performance thumbnail generator
  • vipsedit — Image metadata editor
  • vipsheader — Image header/metadata viewer
⁠Supported Formats
FormatLibraryVersion
JPEGlibjpeg-turbo(Alpine package)
PNGlibpng + libspng + libimagequant(Alpine) / 0.7.4 / 4.4.1
WebPlibwebp(Alpine package)
TIFFlibtiff4.7.1
GIFgiflib(Alpine package)
HEIF / HEIClibheif + libde2651.17.6 / 1.0.16
AVIFlibheif + libaom1.17.6 / 3.6.1
JPEG 2000OpenJPEG2.5.4
OpenEXROpenEXR + Imath3.4.4 / 3.2.2
FITScfitsio4.6.3
PDFpoppler + cairo26.02.0 / 1.18.4

Additional libraries:

LibraryPurposeVersion
lcms2ICC color management2.18
libexifEXIF metadata / auto-rotation0.6.25
HighwaySIMD acceleration1.3.0
ORCSIMD acceleration0.4.41
fftwFourier transform(Alpine package)

⁠Prerequisites

  • Docker with buildx support
⁠Cross-Compilation

If you need to cross-compile (e.g. build for ARM64 on x86_64), you must register QEMU user-mode emulation binaries:

docker run --privileged --rm tonistiigi/binfmt --install all
⁠Build Requirements

Note

The final linking stage is very memory-intensive due to the large number of statically-linked dependencies. The build uses `ninja -j 4` (instead of `-j$(nproc)`) to avoid OOM errors. Ensure your Docker environment has sufficient memory (8 GB+ recommended) and disk space.

⁠Usage

⁠1. Build using docker buildx
# Build for ARM64 (cross-compilation from x86_64)
docker buildx build --platform linux/arm64 -t vips-tools-arm64 --load .

# Build for x86_64 (native build)
docker buildx build --platform linux/amd64 -t vips-tools-amd64 --load .

This command will compile everything and place the resulting vips tools into /output directory in the container.

⁠2. Create a container
docker create --name vips vips-tools-arm64
⁠3. Extract the binaries
docker cp -a vips:/output - |tar -xf -
⁠4. Use the binaries
# Generate a 256px thumbnail
./output/vipsthumbnail input.jpg -s 256 -o thumb.jpg

# View image metadata
./output/vipsheader input.png

# Convert between formats
./output/vips copy input.jpg output.webp

⁠License

This project is in the Public Domain.

CC0 1.0 Universal (CC0 1.0) Public Domain Dedication⁠

To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.

⁠Author

Daisuke (yet another) Maki

Tag summary

Content type

Image

Digest

sha256:95bed671d…

Size

88 MB

Last updated

8 months ago

docker pull makidaisuke/vips-tools-static