NAME

Vips - Perl binding for libvips

SYNOPSIS

use Vips::Image;

my ($major, $minor, $micro) = Vips::version();
print Vips::version_string(), "\n";
my @suffixes = Vips::get_suffixes();  # formats libvips can write: .jpg, .png ...
if (Vips::at_least(8, 15)) { ... }     # libvips version check

Vips::cache_set_max(100);            # operations
Vips::cache_set_max_mem(50 << 20);   # bytes
Vips::cache_set_max_files(10);
Vips::concurrency_set(4);
Vips::leak_set(1);                   # report leaked objects at exit

# For untrusted input (uploads etc.): disable loaders and savers that
# are not designed for hostile files (ImageMagick, matload, vipsload...).
Vips::block_untrusted_set(1);
# Block one operation class and its subclasses, e.g. all PDF loading.
Vips::operation_block_set('VipsForeignLoadPdf', 1);

With libvips 8.15.1 or later a blocked loader is skipped when the format is detected: the next loader that can read the data is used instead, or loading fails. Earlier libvips finds the blocked loader and loading fails with an "operation is blocked" error, so blocked files are rejected either way.

See Vips::Image, Vips::Operations, Vips::Source, Vips::Target, Vips::Const, Vips::Error.

AUTHOR

Sergey Panteleev

COPYRIGHT AND LICENSE

Copyright (c) 2026 Sergey Panteleev.

This library is free software, released under the MIT License; see the LICENSE file.