Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork701
A fast image processing library with low memory needs.
License
libvips/libvips
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
libvips is ademand-driven, horizontallythreadedimage processing library. Compared to similarlibraries,libvips runs quickly and uses littlememory.libvips is licensed under theLGPL-2.1-or-later.
It has around300operationscovering arithmetic, histograms, convolution, morphologicaloperations, frequency filtering, colour, resampling,statistics and others. It supports a large range ofnumerictypes,from 8-bit int to 128-bit complex. Images can have any number of bands.It supports a good range of image formats, including JPEG, JPEG 2000, JPEG XL,TIFF, PNG, WebP, HEIC, AVIF, FITS, Matlab, OpenEXR, PDF, SVG, HDR, PPM / PGM /PFM, CSV, GIF, Analyze, NIfTI, DeepZoom, and OpenSlide. It can also loadimages via ImageMagick or GraphicsMagick, letting it work with formatslike DICOM.
It comes with bindings forC,C++,and thecommand-line.Full bindings are available for :
Language | Binding |
---|---|
Ruby | ruby-vips |
Python | pyvips |
PHP | php-vips |
C# / .NET | NetVips |
Go | govips,vips-gen |
Lua | lua-vips |
Crystal | crystal-vips |
Elixir | vix |
JVM | vips-ffm |
libvips is used as an image processing engine by:
sharp (on node.js) |
imgproxy |
bimg |
sharp for Go |
Ruby on Rails |
CarrierWave |
mediawiki |
PhotoFlow |
JVips |
and others. The official libvips GUI isnip2, a strange combination of aspreadsheet and a photo editor.
There are packages for most Unix-like operating systems, includingmacOS. Check your package manager.
There are binaries for Windows inreleases.
Thelibvips website hasdetailedinstall notes.
libvips uses theMeson build system, version 0.56or later. Meson can useninja
, Visual Studio orXCode as a backend, so you'll also need one of them.
libvips must havebuild-essential
,pkg-config
,libglib2.0-dev
,libexpat1-dev
. See theDependencies section below for a full listof the libvips optional dependencies.
There are basic bash completions incompletions/
, see the README in there.
cd libvips-x.y.xmeson setup build --prefix /my/install/prefixcd buildmeson compilemeson testmeson install
Check the output ofmeson setup
carefully and make sure it found everythingyou wanted it to find. Add arguments tomeson setup
to change the buildconfiguration.
Add flags like
-Dnsgif=false
to turn libvips options on and off, seemeson_options.txt
for a list of all the build options libvips supports.Add flags like
-Dmagick=disabled
to turn libvips dependencies on and off,seemeson_options.txt
and the list below for a summary of all the libvipsdependencies.You might need to add
--libdir lib
on Debian if you don't want the archname in the library path.Add
--default-library static
for a static build.Use e.g.
CC=clang CXX=clang++ meson setup ...
to change compiler.You can have an alternative build directory, pick whatever names you like,for example one for release and one for debug.
There's a more comprehensive test suite you can run once libvips has beeninstalled. Usepytest
in the libvips base directory.
If suitable versions are found, libvips will add support for the followinglibraries automatically. Packages are generally found withpkg-config
,so make sure that is working.
Anything that is compatible with the IJG JPEG library. Usemozjpeg
if youcan. Another option islibjpeg-turbo
.
If available, libvips adds support for EXIF metadata in JPEG files.
The usual SVG loader. If this is not present, vips will try to load SVGsvia imagemagick instead.
If present, libvips will attempt to load PDFs with PDFium. Download theprebuilt pdfium binary from:
https://github.com/bblanchon/pdfium-binaries
Untar to the libvips install prefix, for example:
cd ~/vipstar xf ~/pdfium-linux.tgz
Create apdfium.pc
like this (update the version number):
VIPSHOME=/home/john/vipscat > $VIPSHOME/lib/pkgconfig/pdfium.pc << EOF prefix=$VIPSHOME exec_prefix=\${prefix} libdir=\${exec_prefix}/lib includedir=\${prefix}/include Name: pdfium Description: pdfium Version: 4290 Requires: Libs: -L\${libdir} -lpdfium Cflags: -I\${includedir}EOF
If PDFium is not detected, libvips will look forpoppler-glib
instead.
The Poppler PDF renderer, with a glib API. If this is not present, vipswill try to load PDFs via imagemagick.
If available, libvips will save GIFs withcgif. If this is not present, vips willtry to save gifs via imagemagick instead.
If available, libvips adds support for creating image pyramids withdzsave
.
The TIFF library. It needs to be built with support for JPEG andZIP compression. 3.4b037 and later are known to be OK.
If libvips finds this library, it uses it for fourier transforms.
If present,vips_icc_import()
,vips_icc_export()
andvips_icc_transform()
can be used to manipulate images with ICC profiles.
If present, libvips will load and save PNG files using libspng. If not, itwill look for the standard libpng package.
If one of these quantisation packages is present, libvips can write 8-bitpalette-ised PNGs and GIFs.
If available, libvips adds support for loading and saving alllibMagick-supported image file types. You can enable and disable load and saveseparately.
Imagemagick 6.9+ needs to have been built with--with-modules
. Most packagedIMs are, I think.
If you are going to be using libvips with untrusted images, perhaps in aweb server, for example, you should consider the security implications ofenabling a package with such a large attack surface.
If available, libvips adds support for text rendering. You need thepackage pangocairo inpkg-config --list-all
.
If present, libvips will accelerate some operations with SIMD. If not, itwill look for the orc-0.4 package.
If available, vips can load images from Matlab save files.
If available, vips can load FITS images.
If available, vips can load and save WebP images.
If available, vips can load and save NIfTI images.
If available, libvips will directly read (but not write, sadly)OpenEXR images.
If available, libvips will read and write JPEG2000 images.
If available, libvips will read and write JPEG-XL images.
If available, libvips can load OpenSlide-supported virtual slidefiles: Aperio, Hamamatsu, Leica, MIRAX, Sakura, Trestle, and Ventana.
If available, libvips can load and save HEIC and AVIF images. Your libheif (inturn) needs to be built with the correct decoders and encoders. You can checkwith eg.:
$heif-convert --list-decodersHEIC decoders:- libde265 = libde265 HEVC decoder, version 1.0.9AVIF decoders:- dav1d = dav1d v6.6.0- aom = AOMedia Project AV1 Decoder v3.5.0$heif-enc --list-encodersHEIC encoders:- x265 = x265 HEVC encoder (3.5+1-f0c1022b6) [default]AVIF encoders:- aom = AOMedia Project AV1 Encoder v3.5.0 [default]- svt = SVT-AV1 encoder v1.1.0- rav1e = Rav1e encoder
This project exists thanks to all the people who contribute.
We've had generous financial support from our sponsors. Thank you very much!
About
A fast image processing library with low memory needs.
Topics
Resources
License
Code of conduct
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.