libVIPS
a demand-driven, horizontally threaded image processing library. Compared to similar libraries, libvips runs quickly and uses little memory. - libVIPS / blog / wikipedia
- Automatic computation reordering
- support jpeg-xl since libvips 8.11 / but not as part as ubuntu release
Compiling
It straitghforward through meson. But it requires additional libraries to support features:
- libspng (recommended) - faster png operation
- otherwise use libpng
- mozjpeg (recommended) - compatible with the libjpeg API and ABI. It is intended to be a drop-in replacement for libjpeg. MozJPEG is a patch for libjpeg-turbo.
- libjpeg-turbo - a JPEG image codec that uses SIMD instructions to accelerate baseline JPEG compression and decompression
- libjpeg - fallback
- libjxl - for jpegxl
-
libwebp
- highway - SIMD support
- orc - Optimized Inner Loops Runtime Compiler
nip2
A user interface for libvips.
Doc / c++ / SO
- Hello World
- How libvips opens a file
- Sequential mode read - Not all operations need random access to their source pixels. For example, thumbnailing, the process of shrinking images for display, can work strictly top-to-bottom. But this has re-reading constraint
- Contrast-Limited Adaptive Histogram Equalisation
- Fancy transforms
- filters like sepia, black-white
- HOWTO Image shrinking
- vips_thumbnail ()
- Don’t use thumbnail_image. - Because the image has already been opened, it can’t do any of the shrink-on-load tricks that help make thumbnail fast.
- cmd vipsthumbnail
- Different resize issues
- vips_thumbnail ()
- Making DeepZoom, Zoomify and Google Maps image pyramids with vips
Image arithmetic
Perform an arithmetic operation, such as addition, on every pixel in an image or a pair of images.
- vips_project - the sum of every row of pixels, and the sum of every column of pixels.
Defining Matrix
Internals
pyvips
Ruby
Full bindings are available for
C++
-
The API overloads () to be vips_getpoint()
-
The API overloads [] to be vips_extract_band()
VIPS images / c++
VIPS images are three-dimensional arrays, the dimensions being width, height and bands
- crop synonym for extract_area - Extract an area from an image.
- data - Arrange for the underlying object to be entirely in memory, then return a pointer to the first pixel.
Iterate over pixel
You can’t really iterate over pixels in libvips, since images don’t really exist. Everything is a delayed computation and pixels only exist on demand. You can either implement a new vips operation, or render the whole image to an area of memory and then treat it like any other array. Have a look at vips_image_write_to_memory().
For eg:
From version 8.4
before
Note: it is much faster to do that than accessing pixels through vips_getpoint()
VIPS History
background on its 30 years of development