A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://libvips.github.io/php-vips/classes/Jcupitt-Vips-Image.html below:

php-vips

Image extends ImageAutodoc implements ArrayAccess Image.php : 483

This class represents a Vips image object.

This module provides a binding for the vips image processing library version 8.7 and later, and requires PHP 7.4 and later.

Example
<?php
use Jcupitt\Vips;
$im = Vips\Image::newFromFile($argv[1], ['access' => 'sequential']);
$im = $im->crop(100, 100, $im->width - 200, $im->height - 200);
$im = $im->reduce(1.0 / 0.9, 1.0 / 0.9, ['kernel' => 'linear']);
$mask = Vips\Image::newFromArray(
     [[-1,  -1, -1],
      [-1,  16, -1],
      [-1,  -1, -1]], 8);
$im = $im->conv($mask);
$im->writeToFile($argv[2]);
?>

You'll need this in your composer.json:

    "require": {
        "jcupitt/vips" : "2.0.0"
    }

And run with:

$ composer install
$ ./try1.php ~/pics/k2.jpg x.tif

This example loads a file, crops 100 pixels from every edge, reduces by 10% using a bilinear interpolator (the default is lanczos3), sharpens the image, and saves it back to disc again.

Reading this example line by line, we have:

$im = Vips\Image::newFromFile($argv[1], ['access' => 'sequential']);

Image::newFromFile can load any image file supported by vips. Almost all operations can be given an array of options as a final argument.

In this example, we will be accessing pixels top-to-bottom as we sweep through the image reading and writing, so sequential access mode is best for us. The default mode is random, this allows for full random access to image pixels, but is slower and needs more memory.

You can also load formatted images from strings or create images from PHP arrays.

See the main libvips documentation for a more detailed explaination.

The next line:

$im = $im->crop(100, 100, $im->width - 200, $im->height - 200);

Crops 100 pixels from every edge. You can access any vips image property directly as a PHP property. If the vips property name does not conform to PHP naming conventions, you can use something like $image->get('ipct-data').

Use $image->getFields() to get an array of all the possible field names.

Next we have:

$mask = Vips\Image::newFromArray(
     [[-1,  -1, -1],
      [-1,  16, -1],
      [-1,  -1, -1]], 8);
$im = $im->conv($mask);

Image::newFromArray creates an image from an array constant. The 8 at the end sets the scale: the amount to divide the image by after integer convolution. See the libvips API docs for vips_conv() (the operation invoked by Image::conv) for details on the convolution operator. See Getting more help below.

Finally:

$im->writeToFile($argv[2]);

Image::writeToFile writes an image back to the filesystem. It can write any format supported by vips: the file type is set from the filename suffix. You can write formatted images to strings, and pixel values to arrays.

Getting more help

This binding lets you call the complete C API almost directly. You should consult the C docs for full details on the operations that are available and the arguments they take. There's a handy function list which summarises the operations in the library. You can use the vips command-line interface to get help as well, for example:

$ vips embed
embed an image in a larger image
usage:
   embed in out x y width height
where:
   in           - Input image, input VipsImage
   out          - Output image, output VipsImage
   x            - Left edge of input in output, input gint
                    default: 0
                    min: -1000000000, max: 1000000000
   y            - Top edge of input in output, input gint
                    default: 0
                    min: -1000000000, max: 1000000000
   width        - Image width in pixels, input gint
                    default: 1
                    min: 1, max: 1000000000
   height       - Image height in pixels, input gint
                    default: 1
                    min: 1, max: 1000000000
optional arguments:
   extend       - How to generate the extra pixels, input VipsExtend
                    default: black
                    allowed: black, copy, repeat, mirror, white, background
   background   - Colour for background pixels, input VipsArrayDouble
operation flags: sequential-unbuffered

You can call this from PHP as:

$out = $in->embed($x, $y, $width, $height,
    ['extend' => 'copy', 'background' => [1, 2, 3]]);

'background' can also be a simple constant, such as 12, see below.

The vipsheader command-line program is an easy way to see all the properties of an image. For example:

$ vipsheader -a ~/pics/k2.jpg
/home/john/pics/k2.jpg: 1450x2048 uchar, 3 bands, srgb, jpegload
width: 1450
height: 2048
bands: 3
format: 0 - uchar
coding: 0 - none
interpretation: 22 - srgb
xoffset: 0
yoffset: 0
xres: 2.834646
yres: 2.834646
filename: "/home/john/pics/k2.jpg"
vips-loader: jpegload
jpeg-multiscan: 0
ipct-data: VIPS_TYPE_BLOB, data = 0x20f0010, length = 332

You can access any of these fields as PHP properties of the Image class. Use $image->get('ipct-data') for property names which are not valid under PHP syntax.

Automatic wrapping

This binding has a __call() method and uses it to look up vips operations. For example, the libvips operation embed, which appears in C as vips_embed(), appears in PHP as Image::embed.

The operation's list of required arguments is searched and the first input image is set to the value of self. Operations which do not take an input image, such as Image::black, appear as static methods. The remainder of the arguments you supply in the function call are used to set the other required input arguments. If the final supplied argument is an array, it is used to set any optional input arguments. The result is the required output argument if there is only one result, or an array of values if the operation produces several results.

For example, Image::min, the vips operation that searches an image for the minimum value, has a large number of optional arguments. You can use it to find the minimum value like this:

$min_value = $image->min();

You can ask it to return the position of the minimum with x and y.

$result = $image->min(['x' => true, 'y' => true]);
$min_value = $result['out'];
$x_pos = $result['x'];
$y_pos = $result['y'];

Now x_pos and y_pos will have the coordinates of the minimum value. There's actually a convenience function for this, Image::minpos, see below.

You can also ask for the top n minimum, for example:

$result = $image->min(['size' => 10, 'x_array' => true, 'y_array' => true]);
$x_pos = $result['x_array'];
$y_pos = $result['y_array'];

Now x_pos and y_pos will be 10-element arrays.

Because operations are member functions and return the result image, you can chain them. For example, you can write:

$result_image = $image->real()->cos();

to calculate the cosine of the real part of a complex image.

libvips types are also automatically wrapped and unwrapped. The binding looks at the type of argument required by the operation and converts the value you supply, when it can. For example, Image::linear takes a VipsArrayDouble as an argument for the set of constants to use for multiplication. You can supply this value as an integer, a float, or some kind of compound object and it will be converted for you. You can write:

$result = $image->linear(1, 3);
$result = $image->linear(12.4, 13.9);
$result = $image->linear([1, 2, 3], [4, 5, 6]);
$result = $image->linear(1, [4, 5, 6]);

And so on. You can also use Image::add() and friends, see below.

It does a couple of more ambitious conversions. It will automatically convert to and from the various vips types, like VipsBlob and VipsArrayImage. For example, you can read the ICC profile out of an image like this:

$profile = $image->get('icc-profile-data');

and $profile will be a PHP string.

If an operation takes several input images, you can use a constant for all but one of them and the wrapper will expand the constant to an image for you. For example, Image::ifthenelse() uses a condition image to pick pixels between a then and an else image:

$result = $condition->ifthenelse($then_image, $else_image);

You can use a constant instead of either the then or the else parts and it will be expanded to an image for you. If you use a constant for both then and else, it will be expanded to match the condition image. For example:

$result = $condition->ifthenelse([0, 255, 0], [255, 0, 0]);

Will make an image where true pixels are green and false pixels are red.

This is useful for Image::bandjoin, the thing to join two or more images up bandwise. You can write:

$rgba = $rgb->bandjoin(255);

to append a constant 255 band to an image, perhaps to add an alpha channel. Of course you can also write:

$result = $image->bandjoin($image2);
$result = $image->bandjoin([image2, image3]);
$result = Image::bandjoin([image1, image2, image3]);
$result = $image->bandjoin([image2, 255]);

and so on.

Array access

Images can be treated as arrays of bands. You can write:

$result = $image[1];

to get band 1 from an image (green, in an RGB image).

You can assign to bands as well. You can write:

$image[1] = $other_image;

And band 1 will be replaced by all the bands in $other_image using bandjoin. Use no offset to mean append, use -1 to mean prepend:

$image[] = $other_image; // append bands from other
$image[-1] = $other_image; // prepend bands from other

You can use number and array constants as well, for example:

$image[] = 255; // append a constant 255
$image[1] = [1, 2, 3]; // swap band 1 for three constant bands

Finally, you can delete bands with unset:

unset($image[1]); // remove band 1
Exceptions

The wrapper spots errors from vips operations and throws Vips\Exception. You can catch it in the usual way.

Draw operations

Paint operations like Image::draw_circle and Image::draw_line modify their input image. This makes them hard to use with the rest of libvips: you need to be very careful about the order in which operations execute or you can get nasty crashes.

The wrapper spots operations of this type and makes a private copy of the image in memory before calling the operation. This stops crashes, but it does make it inefficient. If you draw 100 lines on an image, for example, you'll copy the image 100 times. The wrapper does make sure that memory is recycled where possible, so you won't have 100 copies in memory.

If you want to avoid the copies, you'll need to call drawing operations yourself.

Thumbnailing

The thumbnailing functionality is implemented by Vips\Image::thumbnail and Vips\Image::thumbnail_buffer (which thumbnails an image held as a string).

You could write:

$filename = 'image.jpg';
$image = Vips\Image::thumbnail($filename, 200, ['height' => 200]);
$image->writeToFile('my-thumbnail.jpg');
Resample

There are three types of operation in this section.

First, ->affine() applies an affine transform to an image. This is any sort of 2D transform which preserves straight lines; so any combination of stretch, sheer, rotate and translate. You supply an interpolator for it to use to generate pixels (@see Image::newInterpolator()). It will not produce good results for very large shrinks: you'll see aliasing.

->reduce() is like ->affine(), but it can only shrink images, it can't enlarge, rotate, or skew. It's very fast and uses an adaptive kernel (@see Kernel for possible values) for interpolation. It will be slow for very large shrink factors.

->shrink() is a fast block shrinker. It can quickly reduce images by large integer factors. It will give poor results for small size reductions: again, you'll see aliasing.

Next, ->resize() specialises in the common task of image reduce and enlarge. It strings together combinations of ->shrink(), ->reduce(), ->affine() and others to implement a general, high-quality image resizer.

Finally, ->mapim() can apply arbitrary 2D image transforms to an image.

Expansions

Some vips operators take an enum to select an action, for example Image::math can be used to calculate sine of every pixel like this:

$result = $image->math('sin');

This is annoying, so the wrapper expands all these enums into separate members named after the enum. So you can write:

$result = $image->sin();
Convenience functions

The wrapper defines a few extra useful utility functions: Image::get, Image::set, Image::bandsplit, Image::maxpos, Image::minpos, Image::median. See below.

Logging

Use Config::setLogger to enable logging in the usual manner. A sample logger, handy for debugging, is defined in Vips\DebugLogger. You can enable debug logging with:

Vips\Config::setLogger(new Vips\DebugLogger);
Configuration

You can use the methods in Vips\Config to set various global properties of the library. For example, you can control the size of the libvips cache, or the size of the worker threadpools that libvips uses to evaluate images.

Tags
category

Images

author

John Cupitt jcupitt@gmail.com

copyright

2016 John Cupitt

license

https://opensource.org/licenses/MIT MIT

link
https://github.com/jcupitt/php-vips
Table of Contents Interfaces
ArrayAccess
Properties
$bands  : int
$coding  : string
$filename  : string
$format  : string
$height  : int
$interpretation  : string
$width  : int
$xoffset  : int
$xres  : float
$yoffset  : int
$yres  : float
$check_max_stack_size  : bool
libvips executes FFI callbacks off the main thread and this confuses the stack limit checks available since PHP 8.3.0. We need to check if `zend.max_allowed_stack_size` is set to `-1`.
Methods
__call()  : mixed
Call any vips operation as an instance method.
__callStatic()  : mixed
Call any vips operation as a class method.
__clone()  : mixed
__construct()  : mixed
__destruct()  : mixed
__get()  : mixed
Get any property from the underlying image.
__isset()  : bool
Check if the GType of a property from the underlying image exists.
__set()  : void
Set any property on the underlying image.
__toString()  : string
Makes a string-ified version of the Image.
abs()  : Image
acos()  : Image
Return the inverse cosine of an image in degrees.
add()  : Image
Add $other to this image.
addalpha()  : Image
affine()  : Image
analyzeload()  : Image
andimage()  : Image
Bitwise AND of $this and $other. This has to be called ->andimage() rather than ->and() to avoid confusion in phpdoc.
arrayjoin()  : Image
asin()  : Image
Return the inverse sine of an image in degrees.
atan()  : Image
Return the inverse tangent of an image in degrees.
autorot()  : Image
avg()  : float
bandand()  : Image
AND image bands together.
bandbool()  : Image
bandeor()  : Image
EOR image bands together.
bandfold()  : Image
bandjoin()  : Image
Join $this and $other bandwise.
bandjoin_const()  : Image
bandmean()  : Image
bandor()  : Image
OR image bands together.
bandrank()  : Image
For each band element, sort the array of input images and pick the median. Use the index option to pick something else.
bandsplit()  : array<string|int, mixed>
Split $this into an array of single-band images.
bandunfold()  : Image
black()  : Image
boolean()  : Image
boolean_const()  : Image
buildlut()  : Image
byteswap()  : Image
canny()  : Image
case()  : Image
cast()  : Image
ceil()  : Image
Return the smallest integral value not less than the argument.
clamp()  : Image
CMC2LCh()  : Image
CMYK2XYZ()  : Image
colourspace()  : Image
compass()  : Image
complex()  : Image
complex2()  : Image
complexform()  : Image
complexget()  : Image
composite()  : Image
Composite $other on top of $this with $mode.
composite2()  : Image
conj()  : Image
Return the complex conjugate of an image.
conv()  : Image
conva()  : Image
convasep()  : Image
convf()  : Image
convi()  : Image
convsep()  : Image
copy()  : Image
copyMemory()  : Image
Copy to memory.
cos()  : Image
Return the cosine of an image in degrees.
countlines()  : float
crop()  : Image
crossPhase()  : Image
Find the cross-phase of this image with $other.
csvload()  : Image
csvload_source()  : Image
csvsave()  : void
csvsave_target()  : void
dE00()  : Image
dE76()  : Image
dECMC()  : Image
deviate()  : float
dilate()  : Image
Dilate with a structuring element.
divide()  : Image
Divide this image by $other.
draw_circle()  : Image
draw_flood()  : Image
draw_image()  : Image
draw_line()  : Image
draw_mask()  : Image
draw_rect()  : Image
draw_smudge()  : Image
dzsave()  : void
dzsave_buffer()  : string
dzsave_target()  : void
embed()  : Image
eorimage()  : Image
Bitwise EOR of $this and $other.
equal()  : Image
255 where $this is equal to $other.
erode()  : Image
Erode with a structuring element.
exp()  : Image
Return e ** pixel.
exp10()  : Image
Return 10 ** pixel.
extract_area()  : Image
extract_band()  : Image
eye()  : Image
falsecolour()  : Image
fastcor()  : Image
fill_nearest()  : Image
find_trim()  : array<string|int, mixed>
findLoad()  : string|null
Find the name of the load operation vips will use to load a file, for example "VipsForeignLoadJpegFile". You can use this to work out what options to pass to newFromFile().
findLoadBuffer()  : string|null
Find the name of the load operation vips will use to load a buffer, for example 'VipsForeignLoadJpegBuffer'. You can use this to work out what options to pass to newFromBuffer().
findLoadSource()  : string|null
Find the name of the load operation vips will use to load a VipsSource, for example 'VipsForeignLoadJpegSource'. You can use this to work out what options to pass to newFromSource().
fitsload()  : Image
fitsload_source()  : Image
fitssave()  : void
flatten()  : Image
flip()  : Image
fliphor()  : Image
Flip horizontally.
flipver()  : Image
Flip vertically.
float2rad()  : Image
floor()  : Image
Return the largest integral value not greater than the argument.
fractsurf()  : Image
freqmult()  : Image
fwfft()  : Image
gamma()  : Image
gaussblur()  : Image
gaussmat()  : Image
gaussnoise()  : Image
get()  : mixed
Get any property from the underlying image.
getArgumentDescription()  : string
getBlurb()  : string
getDescription()  : string
getFields()  : array<string|int, mixed>
Get the field names available for an image.
getpoint()  : array<string|int, mixed>
getPspec()  : CData|null
getType()  : int
Get the GType of a property from the underlying image. GTypes are integer type identifiers. This function will return 0 if the field does not exist.
gifload()  : Image
gifload_buffer()  : Image
gifload_source()  : Image
gifsave()  : void
gifsave_buffer()  : string
gifsave_target()  : void
globalbalance()  : Image
gravity()  : Image
grey()  : Image
grid()  : Image
hasAlpha()  : bool
Does this image have an alpha channel?
heifload()  : Image
heifload_buffer()  : Image
heifload_source()  : Image
heifsave()  : void
heifsave_buffer()  : string
heifsave_target()  : void
hist_cum()  : Image
hist_entropy()  : float
hist_equal()  : Image
hist_find()  : Image
hist_find_indexed()  : Image
hist_find_ndim()  : Image
hist_ismonotonic()  : bool
hist_local()  : Image
hist_match()  : Image
hist_norm()  : Image
hist_plot()  : Image
hough_circle()  : Image
hough_line()  : Image
HSV2sRGB()  : Image
icc_export()  : Image
icc_import()  : Image
icc_transform()  : Image
identity()  : Image
ifthenelse()  : Image
Use $this as a condition image to pick pixels from either $then or $else.
imag()  : Image
Return the imaginary part of a complex image.
insert()  : Image
invert()  : Image
invertlut()  : Image
invfft()  : Image
join()  : Image
jp2kload()  : Image
jp2kload_buffer()  : Image
jp2kload_source()  : Image
jp2ksave()  : void
jp2ksave_buffer()  : string
jp2ksave_target()  : void
jpegload()  : Image
jpegload_buffer()  : Image
jpegload_source()  : Image
jpegsave()  : void
jpegsave_buffer()  : string
jpegsave_mime()  : void
jpegsave_target()  : void
jxlload()  : Image
jxlload_buffer()  : Image
jxlload_source()  : Image
jxlsave()  : void
jxlsave_buffer()  : string
jxlsave_target()  : void
Lab2LabQ()  : Image
Lab2LabS()  : Image
Lab2LCh()  : Image
Lab2XYZ()  : Image
labelregions()  : Image
LabQ2Lab()  : Image
LabQ2LabS()  : Image
LabQ2sRGB()  : Image
LabS2Lab()  : Image
LabS2LabQ()  : Image
LCh2CMC()  : Image
LCh2Lab()  : Image
less()  : Image
255 where $this is less than $other.
lessEq()  : Image
255 where $this is less than or equal to $other.
linear()  : Image
linecache()  : Image
log()  : Image
Return the natural log of an image.
log10()  : Image
Return the log base 10 of an image.
logmat()  : Image
lshift()  : Image
Shift $this left by $other.
magickload()  : Image
magickload_buffer()  : Image
magicksave()  : void
magicksave_buffer()  : string
mapim()  : Image
maplut()  : Image
mask_butterworth()  : Image
mask_butterworth_band()  : Image
mask_butterworth_ring()  : Image
mask_fractal()  : Image
mask_gaussian()  : Image
mask_gaussian_band()  : Image
mask_gaussian_ring()  : Image
mask_ideal()  : Image
mask_ideal_band()  : Image
mask_ideal_ring()  : Image
match()  : Image
math()  : Image
math2()  : Image
math2_const()  : Image
matload()  : Image
matrixinvert()  : Image
matrixload()  : Image
matrixload_source()  : Image
matrixmultiply()  : Image
matrixprint()  : void
matrixsave()  : void
matrixsave_target()  : void
max()  : float
maxpair()  : Image
maxpos()  : array<string|int, mixed>
Position of max is awkward with plain self::max.
measure()  : Image
median()  : Image
$size x $size median filter.
merge()  : Image
min()  : float
minpair()  : Image
minpos()  : array<string|int, mixed>
Position of min is awkward with plain self::max.
more()  : Image
255 where $this is more than $other.
moreEq()  : Image
255 where $this is more than or equal to $other.
morph()  : Image
mosaic()  : Image
mosaic1()  : Image
msb()  : Image
multiply()  : Image
Multiply this image by $other.
newFromArray()  : Image
Create a new Image from a php array.
newFromBuffer()  : Image
Create a new Image from a compressed image held as a string.
newFromFile()  : Image
Create a new Image from a file on disc.
newFromImage()  : Image
Create a new image from a constant.
newFromMemory()  : Image
Wraps an Image around an area of memory containing a C-style array.
newFromSource()  : self
newInterpolator()  : Interpolate
Deprecated thing to make an interpolator.
niftiload()  : Image
niftiload_source()  : Image
niftisave()  : void
notEq()  : Image
255 where $this is not equal to $other.
offsetExists()  : bool
Does band exist in image.
offsetGet()  : Image|null
Get band from image.
offsetSet()  : void
Set a band.
offsetUnset()  : void
Remove a band from an image.
openexrload()  : Image
openslideload()  : Image
openslideload_source()  : Image
orimage()  : Image
Bitwise OR of $this and $other.
pdfload()  : Image
pdfload_buffer()  : Image
pdfload_source()  : Image
percent()  : int
perlin()  : Image
phasecor()  : Image
pngload()  : Image
pngload_buffer()  : Image
pngload_source()  : Image
pngsave()  : void
pngsave_buffer()  : string
pngsave_target()  : void
polar()  : Image
Return an image converted to polar coordinates.
pow()  : Image
Find $this to the power of $other.
ppmload()  : Image
ppmload_buffer()  : Image
ppmload_source()  : Image
ppmsave()  : void
ppmsave_target()  : void
premultiply()  : Image
prewitt()  : Image
printAll()  : void
profile()  : array<string|int, mixed>
profile_load()  : string
project()  : array<string|int, mixed>
quadratic()  : Image
rad2float()  : Image
radload()  : Image
radload_buffer()  : Image
radload_source()  : Image
radsave()  : void
radsave_buffer()  : string
radsave_target()  : void
rank()  : Image
rawload()  : Image
rawsave()  : void
rawsave_buffer()  : string
rawsave_target()  : void
real()  : Image
Return the real part of a complex image.
recomb()  : Image
rect()  : Image
Return an image converted to rectangular coordinates.
reduce()  : Image
reduceh()  : Image
reducev()  : Image
ref()  : void
relational()  : Image
relational_const()  : Image
remainder()  : Image
Remainder of this image and $other.
remainder_const()  : Image
remosaic()  : Image
remove()  : void
Remove a field from the underlying image.
replicate()  : Image
resize()  : Image
rint()  : Image
Return the nearest integral value.
rot()  : Image
rot180()  : Image
Rotate 180 degrees.
rot270()  : Image
Rotate 270 degrees clockwise.
rot45()  : Image
rot90()  : Image
Rotate 90 degrees clockwise.
rotate()  : Image
round()  : Image
rshift()  : Image
Shift $this right by $other.
scale()  : Image
scharr()  : Image
scRGB2BW()  : Image
scRGB2sRGB()  : Image
scRGB2XYZ()  : Image
sdf()  : Image
sequential()  : Image
set()  : void
Set any property on the underlying image.
setProgress()  : void
Enable progress reporting on an image.
setString()  : bool
setType()  : void
Set the type and value for any property on the underlying image.
sharpen()  : Image
shrink()  : Image
shrinkh()  : Image
shrinkv()  : Image
sign()  : Image
signalConnect()  : void
Connect to a signal on this object.
similarity()  : Image
sin()  : Image
Return the sine of an image in degrees.
sines()  : Image
smartcrop()  : Image
sobel()  : Image
spcor()  : Image
spectrum()  : Image
sRGB2HSV()  : Image
sRGB2scRGB()  : Image
stats()  : Image
stdif()  : Image
subsample()  : Image
subtract()  : Image
Subtract $other from this image.
sum()  : Image
svgload()  : Image
svgload_buffer()  : Image
svgload_source()  : Image
switch()  : Image
system()  : void
tan()  : Image
Return the tangent of an image in degrees.
text()  : Image
thumbnail()  : Image
thumbnail_buffer()  : Image
thumbnail_image()  : Image
thumbnail_source()  : Image
tiffload()  : Image
tiffload_buffer()  : Image
tiffload_source()  : Image
tiffsave()  : void
tiffsave_buffer()  : string
tiffsave_target()  : void
tilecache()  : Image
tonelut()  : Image
transpose3d()  : Image
typeOf()  : int
A deprecated synonym for getType().
unpremultiply()  : Image
unref()  : void
unrefOutputs()  : void
vipsload()  : Image
vipsload_source()  : Image
vipssave()  : void
vipssave_target()  : void
webpload()  : Image
webpload_buffer()  : Image
webpload_source()  : Image
webpsave()  : void
webpsave_buffer()  : string
webpsave_mime()  : void
webpsave_target()  : void
wop()  : Image
Find $other to the power of $this.
worley()  : Image
wrap()  : Image
writeToArray()  : array<string|int, mixed>
Write an image to a PHP array.
writeToBuffer()  : string
Write an image to a formatted string.
writeToFile()  : void
Write an image to a file.
writeToMemory()  : string
Write an image to a large memory array.
writeToTarget()  : void
xyz()  : Image
XYZ2CMYK()  : Image
XYZ2Lab()  : Image
XYZ2scRGB()  : Image
XYZ2Yxy()  : Image
Yxy2XYZ()  : Image
zone()  : Image
zoom()  : Image
getMarshaler()  : Closure|null
$bands ImageAutodoc.php : 0 public int $bands

Number of bands in image

$coding ImageAutodoc.php : 0 public string $coding

Pixel coding @see Coding for possible values

$filename ImageAutodoc.php : 0 public string $filename

Image filename

$format ImageAutodoc.php : 0 public string $format

Pixel format in image @see BandFormat for possible values

$height ImageAutodoc.php : 0 public int $height

Image height in pixels

$interpretation ImageAutodoc.php : 0 public string $interpretation

Pixel interpretation @see Interpretation for possible values

$width ImageAutodoc.php : 0 public int $width

Image width in pixels

$xoffset ImageAutodoc.php : 0 public int $xoffset

Horizontal offset of origin

$xres ImageAutodoc.php : 0 public float $xres

Horizontal resolution in pixels/mm

$yoffset ImageAutodoc.php : 0 public int $yoffset

Vertical offset of origin

$yres ImageAutodoc.php : 0 public float $yres

Vertical resolution in pixels/mm

$check_max_stack_size GObject.php : 69

libvips executes FFI callbacks off the main thread and this confuses the stack limit checks available since PHP 8.3.0. We need to check if `zend.max_allowed_stack_size` is set to `-1`.

private static bool $check_max_stack_size = true

See: https://github.com/libvips/php-vips/pull/237.

__call() Image.php : 1401

Call any vips operation as an instance method.

public __call(string $name, array<string|int, mixed> $arguments) : mixed Parameters
$name : string

The thing we call.

$arguments : array<string|int, mixed>

The arguments to the thing.

Tags
throws
Exception
Return valuesmixed

The result.

__callStatic() Image.php : 1416

Call any vips operation as a class method.

public static __callStatic(string $name, array<string|int, mixed> $arguments) : mixed Parameters
$name : string

The thing we call.

$arguments : array<string|int, mixed>

The arguments to the thing.

Tags
throws
Exception
Return valuesmixed

The result.

__clone() GObject.php : 93 public __clone() : mixed __construct() VipsObject.php : 69 public __construct(CData $pointer) : mixed Parameters
$pointer : CData
__destruct() GObject.php : 88 public __destruct() : mixed __get() Image.php : 1168

Get any property from the underlying image.

public __get(string $name) : mixed Parameters
$name : string

The property name.

Tags
throws
Exception
__isset() Image.php : 1194

Check if the GType of a property from the underlying image exists.

public __isset(string $name) : bool Parameters
$name : string

The property name.

Return valuesbool __set() Image.php : 1182

Set any property on the underlying image.

public __set(string $name, mixed $value) : void Parameters
$name : string

The property name.

$value : mixed

The value to set for this property.

Tags
throws
Exception
__toString() Image.php : 1378

Makes a string-ified version of the Image.

public __toString() : string Return valuesstring abs() ImageAutodoc.php : 0 public abs([array<string|int, mixed> $options = = '[]' ]) : Image

Absolute value of an image.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage acos() Image.php : 2346

Return the inverse cosine of an image in degrees.

public acos() : Image Tags
throws
Exception
Return valuesImage

A new image.

add() Image.php : 1585

Add $other to this image.

public add(mixed $other[, array<string|int, mixed> $options = [] ]) : Image Parameters
$other : mixed

The thing to add to this image.

$options : array<string|int, mixed> = []

An array of options to pass to the operation.

Tags
throws
Exception
Return valuesImage

A new image.

addalpha() ImageAutodoc.php : 0 public addalpha([array<string|int, mixed> $options = = '[]' ]) : Image

Append an alpha channel.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage affine() ImageAutodoc.php : 0 public affine(array<string|int, float>|float $matrix[, array<string|int, mixed> $options = = '[]' ]) : Image

Affine transform of an image.

Parameters
$matrix : array<string|int, float>|float
$options : array<string|int, mixed> = = '[]'
Return valuesImage analyzeload() ImageAutodoc.php : 0 public static analyzeload(string $filename[, array<string|int, mixed> $options = = '[]' ]) : Image

Load an Analyze6 image.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage andimage() Image.php : 1757

Bitwise AND of $this and $other. This has to be called ->andimage() rather than ->and() to avoid confusion in phpdoc.

public andimage(mixed $other[, array<string|int, mixed> $options = [] ]) : Image Parameters
$other : mixed

The right-hand side of the operator.

$options : array<string|int, mixed> = []

An array of options to pass to the operation.

Tags
throws
Exception
Return valuesImage

A new image.

arrayjoin() ImageAutodoc.php : 0 public static arrayjoin(array<string|int, Image>|Image $in[, array<string|int, mixed> $options = = '[]' ]) : Image

Join an array of images.

Parameters
$in : array<string|int, Image>|Image
$options : array<string|int, mixed> = = '[]'
Return valuesImage asin() Image.php : 2334

Return the inverse sine of an image in degrees.

public asin() : Image Tags
throws
Exception
Return valuesImage

A new image.

atan() Image.php : 2358

Return the inverse tangent of an image in degrees.

public atan() : Image Tags
throws
Exception
Return valuesImage

A new image.

autorot() ImageAutodoc.php : 0 public autorot([array<string|int, mixed> $options = = '[]' ]) : Image

Autorotate image by exif tag.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage avg() ImageAutodoc.php : 0 public avg([array<string|int, mixed> $options = = '[]' ]) : float

Find image average.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesfloat bandand() Image.php : 2182

AND image bands together.

public bandand() : Image Tags
throws
Exception
Return valuesImage

A new image.

bandbool() ImageAutodoc.php : 0 public bandbool(string $boolean[, array<string|int, mixed> $options = = '[]' ]) : Image

Boolean operation across image bands.

Parameters
$boolean : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage bandeor() Image.php : 2208

EOR image bands together.

public bandeor() : Image Tags
throws
Exception
Return valuesImage

A new image.

bandfold() ImageAutodoc.php : 0 public bandfold([array<string|int, mixed> $options = = '[]' ]) : Image

Fold up x axis into bands.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage bandjoin() Image.php : 1929

Join $this and $other bandwise.

public bandjoin(mixed $other[, array<string|int, mixed> $options = [] ]) : Image Parameters
$other : mixed

The right-hand side of the operator.

$options : array<string|int, mixed> = []

An array of options to pass to the operation.

Tags
throws
Exception
Return valuesImage

A new image.

bandjoin_const() ImageAutodoc.php : 0 public bandjoin_const(array<string|int, float>|float $c[, array<string|int, mixed> $options = = '[]' ]) : Image

Append a constant band to an image.

Parameters
$c : array<string|int, float>|float
$options : array<string|int, mixed> = = '[]'
Return valuesImage bandmean() ImageAutodoc.php : 0 public bandmean([array<string|int, mixed> $options = = '[]' ]) : Image

Band-wise average.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage bandor() Image.php : 2195

OR image bands together.

public bandor() : Image Tags
throws
Exception
Return valuesImage

A new image.

bandrank() Image.php : 1999

For each band element, sort the array of input images and pick the median. Use the index option to pick something else.

public bandrank(mixed $other[, array<string|int, mixed> $options = [] ]) : Image Parameters
$other : mixed

The right-hand side of the operator.

$options : array<string|int, mixed> = []

An array of options to pass to the operation.

Tags
throws
Exception
Return valuesImage

A new image.

bandsplit() Image.php : 1977

Split $this into an array of single-band images.

public bandsplit([array<string|int, mixed> $options = [] ]) : array<string|int, mixed> Parameters
$options : array<string|int, mixed> = []

An array of options to pass to the operation.

Tags
throws
Exception
Return valuesarray<string|int, mixed>

An array of images.

bandunfold() ImageAutodoc.php : 0 public bandunfold([array<string|int, mixed> $options = = '[]' ]) : Image

Unfold image bands into x axis.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage black() ImageAutodoc.php : 0 public static black(int $width, int $height[, array<string|int, mixed> $options = = '[]' ]) : Image

Make a black image.

Parameters
$width : int
$height : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage boolean() ImageAutodoc.php : 0 public boolean(Image $right, string $boolean[, array<string|int, mixed> $options = = '[]' ]) : Image

Boolean operation on two images.

Parameters
$right : Image
$boolean : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage boolean_const() ImageAutodoc.php : 0 public boolean_const(string $boolean, array<string|int, float>|float $c[, array<string|int, mixed> $options = = '[]' ]) : Image

Boolean operations against a constant.

Parameters
$boolean : string
$c : array<string|int, float>|float
$options : array<string|int, mixed> = = '[]'
Return valuesImage buildlut() ImageAutodoc.php : 0 public buildlut([array<string|int, mixed> $options = = '[]' ]) : Image

Build a look-up table.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage byteswap() ImageAutodoc.php : 0 public byteswap([array<string|int, mixed> $options = = '[]' ]) : Image

Byteswap an image.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage canny() ImageAutodoc.php : 0 public canny([array<string|int, mixed> $options = = '[]' ]) : Image

Canny edge detector.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage case() ImageAutodoc.php : 0 public case(array<string|int, Image>|Image $cases[, array<string|int, mixed> $options = = '[]' ]) : Image

Use pixel values to pick cases from an array of images.

Parameters
$cases : array<string|int, Image>|Image
$options : array<string|int, mixed> = = '[]'
Return valuesImage cast() ImageAutodoc.php : 0 public cast(string $format[, array<string|int, mixed> $options = = '[]' ]) : Image

Cast an image.

Parameters
$format : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage ceil() Image.php : 2158

Return the smallest integral value not less than the argument.

public ceil() : Image Tags
throws
Exception
Return valuesImage

A new image.

clamp() ImageAutodoc.php : 0 public clamp([array<string|int, mixed> $options = = '[]' ]) : Image

Clamp values of an image.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage CMC2LCh() ImageAutodoc.php : 0 public CMC2LCh([array<string|int, mixed> $options = = '[]' ]) : Image

Transform LCh to CMC.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage CMYK2XYZ() ImageAutodoc.php : 0 public CMYK2XYZ([array<string|int, mixed> $options = = '[]' ]) : Image

Transform CMYK to XYZ.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage colourspace() ImageAutodoc.php : 0 public colourspace(string $space[, array<string|int, mixed> $options = = '[]' ]) : Image

Convert to a new colorspace.

Parameters
$space : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage compass() ImageAutodoc.php : 0 public compass(Image $mask[, array<string|int, mixed> $options = = '[]' ]) : Image

Convolve with rotating mask.

Parameters
$mask : Image
$options : array<string|int, mixed> = = '[]'
Return valuesImage complex() ImageAutodoc.php : 0 public complex(string $cmplx[, array<string|int, mixed> $options = = '[]' ]) : Image

Perform a complex operation on an image.

Parameters
$cmplx : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage complex2() ImageAutodoc.php : 0 public complex2(Image $right, string $cmplx[, array<string|int, mixed> $options = = '[]' ]) : Image

Complex binary operations on two images.

Parameters
$right : Image
$cmplx : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage complexform() ImageAutodoc.php : 0 public complexform(Image $right[, array<string|int, mixed> $options = = '[]' ]) : Image

Form a complex image from two real images.

Parameters
$right : Image
$options : array<string|int, mixed> = = '[]'
Return valuesImage complexget() ImageAutodoc.php : 0 public complexget(string $get[, array<string|int, mixed> $options = = '[]' ]) : Image

Get a component from a complex image.

Parameters
$get : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage composite() Image.php : 2035

Composite $other on top of $this with $mode.

public composite(mixed $other, BlendMode|array<string|int, mixed> $mode[, array<string|int, mixed> $options = [] ]) : Image Parameters
$other : mixed

The overlay.

$mode : BlendMode|array<string|int, mixed>

The mode to composite with.

$options : array<string|int, mixed> = []

An array of options to pass to the operation.

Tags
throws
Exception
Return valuesImage

A new image.

composite2() ImageAutodoc.php : 0 public composite2(Image $overlay, string $mode[, array<string|int, mixed> $options = = '[]' ]) : Image

Blend a pair of images with a blend mode.

Parameters
$overlay : Image
$mode : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage conj() Image.php : 2272

Return the complex conjugate of an image.

public conj() : Image Tags
throws
Exception
Return valuesImage

A new image.

conv() ImageAutodoc.php : 0 public conv(Image $mask[, array<string|int, mixed> $options = = '[]' ]) : Image

Convolution operation.

Parameters
$mask : Image
$options : array<string|int, mixed> = = '[]'
Return valuesImage conva() ImageAutodoc.php : 0 public conva(Image $mask[, array<string|int, mixed> $options = = '[]' ]) : Image

Approximate integer convolution.

Parameters
$mask : Image
$options : array<string|int, mixed> = = '[]'
Return valuesImage convasep() ImageAutodoc.php : 0 public convasep(Image $mask[, array<string|int, mixed> $options = = '[]' ]) : Image

Approximate separable integer convolution.

Parameters
$mask : Image
$options : array<string|int, mixed> = = '[]'
Return valuesImage convf() ImageAutodoc.php : 0 public convf(Image $mask[, array<string|int, mixed> $options = = '[]' ]) : Image

Float convolution operation.

Parameters
$mask : Image
$options : array<string|int, mixed> = = '[]'
Return valuesImage convi() ImageAutodoc.php : 0 public convi(Image $mask[, array<string|int, mixed> $options = = '[]' ]) : Image

Int convolution operation.

Parameters
$mask : Image
$options : array<string|int, mixed> = = '[]'
Return valuesImage convsep() ImageAutodoc.php : 0 public convsep(Image $mask[, array<string|int, mixed> $options = = '[]' ]) : Image

Separable convolution operation.

Parameters
$mask : Image
$options : array<string|int, mixed> = = '[]'
Return valuesImage copy() ImageAutodoc.php : 0 public copy([array<string|int, mixed> $options = = '[]' ]) : Image

Copy an image.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage copyMemory() Image.php : 1150

Copy to memory.

public copyMemory() : Image

An area of memory large enough to hold the complete image is allocated, the image is rendered into it, and a new Image is returned which wraps this memory area.

This is useful for ending a pipeline and starting a new random access one, but can obviously use a lot of memory if the image is large.

Tags
throws
Exception
Return valuesImage

A new Image.

cos() Image.php : 2310

Return the cosine of an image in degrees.

public cos() : Image Tags
throws
Exception
Return valuesImage

A new image.

countlines() ImageAutodoc.php : 0 public countlines(string $direction[, array<string|int, mixed> $options = = '[]' ]) : float

Count lines in an image.

Parameters
$direction : string
$options : array<string|int, mixed> = = '[]'
Return valuesfloat crop() ImageAutodoc.php : 0 public crop(int $left, int $top, int $width, int $height[, array<string|int, mixed> $options = = '[]' ]) : Image

Extract an area from an image.

Parameters
$left : int
$top : int
$width : int
$height : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage crossPhase() Image.php : 2286

Find the cross-phase of this image with $other.

public crossPhase(mixed $other) : Image Parameters
$other : mixed

The thing to cross-phase by.

Tags
throws
Exception
Return valuesImage

A new image.

csvload() ImageAutodoc.php : 0 public static csvload(string $filename[, array<string|int, mixed> $options = = '[]' ]) : Image

Load csv.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage csvload_source() ImageAutodoc.php : 0 public static csvload_source(Source $source[, array<string|int, mixed> $options = = '[]' ]) : Image

Load csv.

Parameters
$source : Source
$options : array<string|int, mixed> = = '[]'
Return valuesImage csvsave() ImageAutodoc.php : 0 public csvsave(string $filename[, array<string|int, mixed> $options = = '[]' ]) : void

Save image to csv.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
csvsave_target() ImageAutodoc.php : 0 public csvsave_target(Target $target[, array<string|int, mixed> $options = = '[]' ]) : void

Save image to csv.

Parameters
$target : Target
$options : array<string|int, mixed> = = '[]'
dE00() ImageAutodoc.php : 0 public dE00(Image $right[, array<string|int, mixed> $options = = '[]' ]) : Image

Calculate dE00.

Parameters
$right : Image
$options : array<string|int, mixed> = = '[]'
Return valuesImage dE76() ImageAutodoc.php : 0 public dE76(Image $right[, array<string|int, mixed> $options = = '[]' ]) : Image

Calculate dE76.

Parameters
$right : Image
$options : array<string|int, mixed> = = '[]'
Return valuesImage dECMC() ImageAutodoc.php : 0 public dECMC(Image $right[, array<string|int, mixed> $options = = '[]' ]) : Image

Calculate dECMC.

Parameters
$right : Image
$options : array<string|int, mixed> = = '[]'
Return valuesImage deviate() ImageAutodoc.php : 0 public deviate([array<string|int, mixed> $options = = '[]' ]) : float

Find image standard deviation.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesfloat dilate() Image.php : 2434

Dilate with a structuring element.

public dilate(mixed $mask) : Image Parameters
$mask : mixed

Dilate with this structuring element.

Tags
throws
Exception
Return valuesImage

A new image.

divide() Image.php : 1645

Divide this image by $other.

public divide(mixed $other[, array<string|int, mixed> $options = [] ]) : Image Parameters
$other : mixed

The thing to divide this image by.

$options : array<string|int, mixed> = []

An array of options to pass to the operation.

Tags
throws
Exception
Return valuesImage

A new image.

draw_circle() ImageAutodoc.php : 0 public draw_circle(array<string|int, float>|float $ink, int $cx, int $cy, int $radius[, array<string|int, mixed> $options = = '[]' ]) : Image

Draw a circle on an image.

Parameters
$ink : array<string|int, float>|float
$cx : int
$cy : int
$radius : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage draw_flood() ImageAutodoc.php : 0 public draw_flood(array<string|int, float>|float $ink, int $x, int $y[, array<string|int, mixed> $options = = '[]' ]) : Image

Flood-fill an area.

Parameters
$ink : array<string|int, float>|float
$x : int
$y : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage draw_image() ImageAutodoc.php : 0 public draw_image(Image $sub, int $x, int $y[, array<string|int, mixed> $options = = '[]' ]) : Image

Paint an image into another image.

Parameters
$sub : Image
$x : int
$y : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage draw_line() ImageAutodoc.php : 0 public draw_line(array<string|int, float>|float $ink, int $x1, int $y1, int $x2, int $y2[, array<string|int, mixed> $options = = '[]' ]) : Image

Draw a line on an image.

Parameters
$ink : array<string|int, float>|float
$x1 : int
$y1 : int
$x2 : int
$y2 : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage draw_mask() ImageAutodoc.php : 0 public draw_mask(array<string|int, float>|float $ink, Image $mask, int $x, int $y[, array<string|int, mixed> $options = = '[]' ]) : Image

Draw a mask on an image.

Parameters
$ink : array<string|int, float>|float
$mask : Image
$x : int
$y : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage draw_rect() ImageAutodoc.php : 0 public draw_rect(array<string|int, float>|float $ink, int $left, int $top, int $width, int $height[, array<string|int, mixed> $options = = '[]' ]) : Image

Paint a rectangle on an image.

Parameters
$ink : array<string|int, float>|float
$left : int
$top : int
$width : int
$height : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage draw_smudge() ImageAutodoc.php : 0 public draw_smudge(int $left, int $top, int $width, int $height[, array<string|int, mixed> $options = = '[]' ]) : Image

Blur a rectangle on an image.

Parameters
$left : int
$top : int
$width : int
$height : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage dzsave() ImageAutodoc.php : 0 public dzsave(string $filename[, array<string|int, mixed> $options = = '[]' ]) : void

Save image to deepzoom file.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
dzsave_buffer() ImageAutodoc.php : 0 public dzsave_buffer([array<string|int, mixed> $options = = '[]' ]) : string

Save image to dz buffer.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesstring dzsave_target() ImageAutodoc.php : 0 public dzsave_target(Target $target[, array<string|int, mixed> $options = = '[]' ]) : void

Save image to deepzoom target.

Parameters
$target : Target
$options : array<string|int, mixed> = = '[]'
embed() ImageAutodoc.php : 0 public embed(int $x, int $y, int $width, int $height[, array<string|int, mixed> $options = = '[]' ]) : Image

Embed an image in a larger image.

Parameters
$x : int
$y : int
$width : int
$height : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage eorimage() Image.php : 1789

Bitwise EOR of $this and $other.

public eorimage(mixed $other[, array<string|int, mixed> $options = [] ]) : Image Parameters
$other : mixed

The right-hand side of the operator.

$options : array<string|int, mixed> = []

An array of options to pass to the operation.

Tags
throws
Exception
Return valuesImage

A new image.

equal() Image.php : 1889

255 where $this is equal to $other.

public equal(mixed $other[, array<string|int, mixed> $options = [] ]) : Image Parameters
$other : mixed

The right-hand side of the operator.

$options : array<string|int, mixed> = []

An array of options to pass to the operation.

Tags
throws
Exception
Return valuesImage

A new image.

erode() Image.php : 2420

Erode with a structuring element.

public erode(mixed $mask) : Image Parameters
$mask : mixed

Erode with this structuring element.

Tags
throws
Exception
Return valuesImage

A new image.

exp() Image.php : 2394

Return e ** pixel.

public exp() : Image Tags
throws
Exception
Return valuesImage

A new image.

exp10() Image.php : 2406

Return 10 ** pixel.

public exp10() : Image Tags
throws
Exception
Return valuesImage

A new image.

ImageAutodoc.php : 0 public extract_area(int $left, int $top, int $width, int $height[, array<string|int, mixed> $options = = '[]' ]) : Image

Extract an area from an image.

Parameters
$left : int
$top : int
$width : int
$height : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage extract_band() ImageAutodoc.php : 0 public extract_band(int $band[, array<string|int, mixed> $options = = '[]' ]) : Image

Extract band from an image.

Parameters
$band : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage eye() ImageAutodoc.php : 0 public static eye(int $width, int $height[, array<string|int, mixed> $options = = '[]' ]) : Image

Make an image showing the eye's spatial response.

Parameters
$width : int
$height : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage falsecolour() ImageAutodoc.php : 0 public falsecolour([array<string|int, mixed> $options = = '[]' ]) : Image

False-color an image.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage fastcor() ImageAutodoc.php : 0 public fastcor(Image $ref[, array<string|int, mixed> $options = = '[]' ]) : Image

Fast correlation.

Parameters
$ref : Image
$options : array<string|int, mixed> = = '[]'
Return valuesImage fill_nearest() ImageAutodoc.php : 0 public fill_nearest([array<string|int, mixed> $options = = '[]' ]) : Image

Fill image zeros with nearest non-zero pixel.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage find_trim() ImageAutodoc.php : 0 public find_trim([array<string|int, mixed> $options = = '[]' ]) : array<string|int, mixed>

Search an image for non-edge areas. Return array with: [ 'left' => @type integer Left edge of image 'top' => @type integer Top edge of extract area 'width' => @type integer Width of extract area 'height' => @type integer Height of extract area ];

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesarray<string|int, mixed> findLoad() Image.php : 696

Find the name of the load operation vips will use to load a file, for example "VipsForeignLoadJpegFile". You can use this to work out what options to pass to newFromFile().

public static findLoad(string $filename) : string|null Parameters
$filename : string

The file to test.

Return valuesstring|null

The name of the load operation, or null.

findLoadBuffer() Image.php : 745

Find the name of the load operation vips will use to load a buffer, for example 'VipsForeignLoadJpegBuffer'. You can use this to work out what options to pass to newFromBuffer().

public static findLoadBuffer(string $buffer) : string|null Parameters
$buffer : string

The formatted image to test.

Return valuesstring|null

The name of the load operation, or null.

findLoadSource() Image.php : 922

Find the name of the load operation vips will use to load a VipsSource, for example 'VipsForeignLoadJpegSource'. You can use this to work out what options to pass to newFromSource().

public static findLoadSource(Source $source) : string|null Parameters
$source : Source

The source to test

Return valuesstring|null

The name of the load operation, or null.

fitsload() ImageAutodoc.php : 0 public static fitsload(string $filename[, array<string|int, mixed> $options = = '[]' ]) : Image

Load a FITS image.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage fitsload_source() ImageAutodoc.php : 0 public static fitsload_source(Source $source[, array<string|int, mixed> $options = = '[]' ]) : Image

Load FITS from a source.

Parameters
$source : Source
$options : array<string|int, mixed> = = '[]'
Return valuesImage fitssave() ImageAutodoc.php : 0 public fitssave(string $filename[, array<string|int, mixed> $options = = '[]' ]) : void

Save image to fits file.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
flatten() ImageAutodoc.php : 0 public flatten([array<string|int, mixed> $options = = '[]' ]) : Image

Flatten alpha out of an image.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage flip() ImageAutodoc.php : 0 public flip(string $direction[, array<string|int, mixed> $options = = '[]' ]) : Image

Flip an image.

Parameters
$direction : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage fliphor() Image.php : 2460

Flip horizontally.

public fliphor() : Image Tags
throws
Exception
Return valuesImage

A new image.

flipver() Image.php : 2472

Flip vertically.

public flipver() : Image Tags
throws
Exception
Return valuesImage

A new image.

float2rad() ImageAutodoc.php : 0 public float2rad([array<string|int, mixed> $options = = '[]' ]) : Image

Transform float RGB to Radiance coding.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage floor() Image.php : 2146

Return the largest integral value not greater than the argument.

public floor() : Image Tags
throws
Exception
Return valuesImage

A new image.

fractsurf() ImageAutodoc.php : 0 public static fractsurf(int $width, int $height, float $fractal_dimension[, array<string|int, mixed> $options = = '[]' ]) : Image

Make a fractal surface.

Parameters
$width : int
$height : int
$fractal_dimension : float
$options : array<string|int, mixed> = = '[]'
Return valuesImage freqmult() ImageAutodoc.php : 0 public freqmult(Image $mask[, array<string|int, mixed> $options = = '[]' ]) : Image

Frequency-domain filtering.

Parameters
$mask : Image
$options : array<string|int, mixed> = = '[]'
Return valuesImage fwfft() ImageAutodoc.php : 0 public fwfft([array<string|int, mixed> $options = = '[]' ]) : Image

Forward FFT.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage gamma() ImageAutodoc.php : 0 public gamma([array<string|int, mixed> $options = = '[]' ]) : Image

Gamma an image.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage gaussblur() ImageAutodoc.php : 0 public gaussblur(float $sigma[, array<string|int, mixed> $options = = '[]' ]) : Image

Gaussian blur.

Parameters
$sigma : float
$options : array<string|int, mixed> = = '[]'
Return valuesImage gaussmat() ImageAutodoc.php : 0 public static gaussmat(float $sigma, float $min_ampl[, array<string|int, mixed> $options = = '[]' ]) : Image

Make a gaussian image.

Parameters
$sigma : float
$min_ampl : float
$options : array<string|int, mixed> = = '[]'
Return valuesImage gaussnoise() ImageAutodoc.php : 0 public static gaussnoise(int $width, int $height[, array<string|int, mixed> $options = = '[]' ]) : Image

Make a gaussnoise image.

Parameters
$width : int
$height : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage get() Image.php : 1214

Get any property from the underlying image.

public get(string $name) : mixed

This is handy for fields whose name does not match PHP's variable naming conventions, like 'exif-data'.

It will throw an exception if $name does not exist. Use Image::getType() to test for the existence of a field.

Parameters
$name : string

The property name.

Tags
throws
Exception
getArgumentDescription() VipsObject.php : 146 public getArgumentDescription(string $name) : string Parameters
$name : string
Return valuesstring getBlurb() VipsObject.php : 140 public getBlurb(string $name) : string Parameters
$name : string
Return valuesstring getDescription() VipsObject.php : 83 public getDescription() : string Return valuesstring getFields() Image.php : 1256

Get the field names available for an image.

public getFields() : array<string|int, mixed> Return valuesarray<string|int, mixed> getpoint() ImageAutodoc.php : 0 public getpoint(int $x, int $y[, array<string|int, mixed> $options = = '[]' ]) : array<string|int, mixed>

Read a point from an image.

Parameters
$x : int
$y : int
$options : array<string|int, mixed> = = '[]'
Return valuesarray<string|int, mixed> getPspec() VipsObject.php : 92 public getPspec(string $name) : CData|null Parameters
$name : string
Return valuesCData|null getType() Image.php : 1234

Get the GType of a property from the underlying image. GTypes are integer type identifiers. This function will return 0 if the field does not exist.

public getType(string $name) : int Parameters
$name : string

The property name.

Return valuesint gifload() ImageAutodoc.php : 0 public static gifload(string $filename[, array<string|int, mixed> $options = = '[]' ]) : Image

Load GIF with libnsgif.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage gifload_buffer() ImageAutodoc.php : 0 public static gifload_buffer(string $buffer[, array<string|int, mixed> $options = = '[]' ]) : Image

Load GIF with libnsgif.

Parameters
$buffer : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage gifload_source() ImageAutodoc.php : 0 public static gifload_source(Source $source[, array<string|int, mixed> $options = = '[]' ]) : Image

Load gif from source.

Parameters
$source : Source
$options : array<string|int, mixed> = = '[]'
Return valuesImage gifsave() ImageAutodoc.php : 0 public gifsave(string $filename[, array<string|int, mixed> $options = = '[]' ]) : void

Save as gif.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
gifsave_buffer() ImageAutodoc.php : 0 public gifsave_buffer([array<string|int, mixed> $options = = '[]' ]) : string

Save as gif.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesstring gifsave_target() ImageAutodoc.php : 0 public gifsave_target(Target $target[, array<string|int, mixed> $options = = '[]' ]) : void

Save as gif.

Parameters
$target : Target
$options : array<string|int, mixed> = = '[]'
globalbalance() ImageAutodoc.php : 0 public globalbalance([array<string|int, mixed> $options = = '[]' ]) : Image

Global balance an image mosaic.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage gravity() ImageAutodoc.php : 0 public gravity(string $direction, int $width, int $height[, array<string|int, mixed> $options = = '[]' ]) : Image

Place an image within a larger image with a certain gravity.

Parameters
$direction : string
$width : int
$height : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage grey() ImageAutodoc.php : 0 public static grey(int $width, int $height[, array<string|int, mixed> $options = = '[]' ]) : Image

Make a grey ramp image.

Parameters
$width : int
$height : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage grid() ImageAutodoc.php : 0 public grid(int $tile_height, int $across, int $down[, array<string|int, mixed> $options = = '[]' ]) : Image

Grid an image.

Parameters
$tile_height : int
$across : int
$down : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage hasAlpha() Image.php : 1429

Does this image have an alpha channel?

public hasAlpha() : bool

Uses colour space interpretation with number of channels to guess this.

Return valuesbool

indicating if this image has an alpha channel.

heifload() ImageAutodoc.php : 0 public static heifload(string $filename[, array<string|int, mixed> $options = = '[]' ]) : Image

Load a HEIF image.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage heifload_buffer() ImageAutodoc.php : 0 public static heifload_buffer(string $buffer[, array<string|int, mixed> $options = = '[]' ]) : Image

Load a HEIF image.

Parameters
$buffer : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage heifload_source() ImageAutodoc.php : 0 public static heifload_source(Source $source[, array<string|int, mixed> $options = = '[]' ]) : Image

Load a HEIF image.

Parameters
$source : Source
$options : array<string|int, mixed> = = '[]'
Return valuesImage heifsave() ImageAutodoc.php : 0 public heifsave(string $filename[, array<string|int, mixed> $options = = '[]' ]) : void

Save image in HEIF format.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
heifsave_buffer() ImageAutodoc.php : 0 public heifsave_buffer([array<string|int, mixed> $options = = '[]' ]) : string

Save image in HEIF format.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesstring heifsave_target() ImageAutodoc.php : 0 public heifsave_target(Target $target[, array<string|int, mixed> $options = = '[]' ]) : void

Save image in HEIF format.

Parameters
$target : Target
$options : array<string|int, mixed> = = '[]'
hist_cum() ImageAutodoc.php : 0 public hist_cum([array<string|int, mixed> $options = = '[]' ]) : Image

Form cumulative histogram.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage hist_entropy() ImageAutodoc.php : 0 public hist_entropy([array<string|int, mixed> $options = = '[]' ]) : float

Estimate image entropy.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesfloat hist_equal() ImageAutodoc.php : 0 public hist_equal([array<string|int, mixed> $options = = '[]' ]) : Image

Histogram equalisation.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage hist_find() ImageAutodoc.php : 0 public hist_find([array<string|int, mixed> $options = = '[]' ]) : Image

Find image histogram.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage hist_find_indexed() ImageAutodoc.php : 0 public hist_find_indexed(Image $index[, array<string|int, mixed> $options = = '[]' ]) : Image

Find indexed image histogram.

Parameters
$index : Image
$options : array<string|int, mixed> = = '[]'
Return valuesImage hist_find_ndim() ImageAutodoc.php : 0 public hist_find_ndim([array<string|int, mixed> $options = = '[]' ]) : Image

Find n-dimensional image histogram.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage hist_ismonotonic() ImageAutodoc.php : 0 public hist_ismonotonic([array<string|int, mixed> $options = = '[]' ]) : bool

Test for monotonicity.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesbool hist_local() ImageAutodoc.php : 0 public hist_local(int $width, int $height[, array<string|int, mixed> $options = = '[]' ]) : Image

Local histogram equalisation.

Parameters
$width : int
$height : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage hist_match() ImageAutodoc.php : 0 public hist_match(Image $ref[, array<string|int, mixed> $options = = '[]' ]) : Image

Match two histograms.

Parameters
$ref : Image
$options : array<string|int, mixed> = = '[]'
Return valuesImage hist_norm() ImageAutodoc.php : 0 public hist_norm([array<string|int, mixed> $options = = '[]' ]) : Image

Normalise histogram.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage hist_plot() ImageAutodoc.php : 0 public hist_plot([array<string|int, mixed> $options = = '[]' ]) : Image

Plot histogram.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage hough_circle() ImageAutodoc.php : 0 public hough_circle([array<string|int, mixed> $options = = '[]' ]) : Image

Find hough circle transform.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage hough_line() ImageAutodoc.php : 0 public hough_line([array<string|int, mixed> $options = = '[]' ]) : Image

Find hough line transform.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage HSV2sRGB() ImageAutodoc.php : 0 public HSV2sRGB([array<string|int, mixed> $options = = '[]' ]) : Image

Transform HSV to sRGB.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage icc_export() ImageAutodoc.php : 0 public icc_export([array<string|int, mixed> $options = = '[]' ]) : Image

Output to device with ICC profile.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage icc_import() ImageAutodoc.php : 0 public icc_import([array<string|int, mixed> $options = = '[]' ]) : Image

Import from device with ICC profile.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage icc_transform() ImageAutodoc.php : 0 public icc_transform(string $output_profile[, array<string|int, mixed> $options = = '[]' ]) : Image

Transform between devices with ICC profiles.

Parameters
$output_profile : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage identity() ImageAutodoc.php : 0 public static identity([array<string|int, mixed> $options = = '[]' ]) : Image

Make a 1D image where pixel values are indexes.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage ifthenelse() Image.php : 2109

Use $this as a condition image to pick pixels from either $then or $else.

public ifthenelse(mixed $then, mixed $else[, array<string|int, mixed> $options = [] ]) : Image Parameters
$then : mixed

The true side of the operator

$else : mixed

The false side of the operator.

$options : array<string|int, mixed> = []

An array of options to pass to the operation.

Tags
throws
Exception
Return valuesImage

A new image.

imag() Image.php : 2232

Return the imaginary part of a complex image.

public imag() : Image Tags
throws
Exception
Return valuesImage

A new image.

insert() ImageAutodoc.php : 0 public insert(Image $sub, int $x, int $y[, array<string|int, mixed> $options = = '[]' ]) : Image

Insert image @sub into @main at @x, @y.

Parameters
$sub : Image
$x : int
$y : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage invert() ImageAutodoc.php : 0 public invert([array<string|int, mixed> $options = = '[]' ]) : Image

Invert an image.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage invertlut() ImageAutodoc.php : 0 public invertlut([array<string|int, mixed> $options = = '[]' ]) : Image

Build an inverted look-up table.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage invfft() ImageAutodoc.php : 0 public invfft([array<string|int, mixed> $options = = '[]' ]) : Image

Inverse FFT.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage join() ImageAutodoc.php : 0 public join(Image $in2, string $direction[, array<string|int, mixed> $options = = '[]' ]) : Image

Join a pair of images.

Parameters
$in2 : Image
$direction : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage jp2kload() ImageAutodoc.php : 0 public static jp2kload(string $filename[, array<string|int, mixed> $options = = '[]' ]) : Image

Load JPEG2000 image.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage jp2kload_buffer() ImageAutodoc.php : 0 public static jp2kload_buffer(string $buffer[, array<string|int, mixed> $options = = '[]' ]) : Image

Load JPEG2000 image.

Parameters
$buffer : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage jp2kload_source() ImageAutodoc.php : 0 public static jp2kload_source(Source $source[, array<string|int, mixed> $options = = '[]' ]) : Image

Load JPEG2000 image.

Parameters
$source : Source
$options : array<string|int, mixed> = = '[]'
Return valuesImage jp2ksave() ImageAutodoc.php : 0 public jp2ksave(string $filename[, array<string|int, mixed> $options = = '[]' ]) : void

Save image in JPEG2000 format.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
jp2ksave_buffer() ImageAutodoc.php : 0 public jp2ksave_buffer([array<string|int, mixed> $options = = '[]' ]) : string

Save image in JPEG2000 format.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesstring jp2ksave_target() ImageAutodoc.php : 0 public jp2ksave_target(Target $target[, array<string|int, mixed> $options = = '[]' ]) : void

Save image in JPEG2000 format.

Parameters
$target : Target
$options : array<string|int, mixed> = = '[]'
jpegload() ImageAutodoc.php : 0 public static jpegload(string $filename[, array<string|int, mixed> $options = = '[]' ]) : Image

Load jpeg from file.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage jpegload_buffer() ImageAutodoc.php : 0 public static jpegload_buffer(string $buffer[, array<string|int, mixed> $options = = '[]' ]) : Image

Load jpeg from buffer.

Parameters
$buffer : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage jpegload_source() ImageAutodoc.php : 0 public static jpegload_source(Source $source[, array<string|int, mixed> $options = = '[]' ]) : Image

Load image from jpeg source.

Parameters
$source : Source
$options : array<string|int, mixed> = = '[]'
Return valuesImage jpegsave() ImageAutodoc.php : 0 public jpegsave(string $filename[, array<string|int, mixed> $options = = '[]' ]) : void

Save image to jpeg file.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
jpegsave_buffer() ImageAutodoc.php : 0 public jpegsave_buffer([array<string|int, mixed> $options = = '[]' ]) : string

Save image to jpeg buffer.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesstring jpegsave_mime() ImageAutodoc.php : 0 public jpegsave_mime([array<string|int, mixed> $options = = '[]' ]) : void

Save image to jpeg mime.

Parameters
$options : array<string|int, mixed> = = '[]'
jpegsave_target() ImageAutodoc.php : 0 public jpegsave_target(Target $target[, array<string|int, mixed> $options = = '[]' ]) : void

Save image to jpeg target.

Parameters
$target : Target
$options : array<string|int, mixed> = = '[]'
jxlload() ImageAutodoc.php : 0 public static jxlload(string $filename[, array<string|int, mixed> $options = = '[]' ]) : Image

Load JPEG-XL image.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage jxlload_buffer() ImageAutodoc.php : 0 public static jxlload_buffer(string $buffer[, array<string|int, mixed> $options = = '[]' ]) : Image

Load JPEG-XL image.

Parameters
$buffer : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage jxlload_source() ImageAutodoc.php : 0 public static jxlload_source(Source $source[, array<string|int, mixed> $options = = '[]' ]) : Image

Load JPEG-XL image.

Parameters
$source : Source
$options : array<string|int, mixed> = = '[]'
Return valuesImage jxlsave() ImageAutodoc.php : 0 public jxlsave(string $filename[, array<string|int, mixed> $options = = '[]' ]) : void

Save image in JPEG-XL format.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
jxlsave_buffer() ImageAutodoc.php : 0 public jxlsave_buffer([array<string|int, mixed> $options = = '[]' ]) : string

Save image in JPEG-XL format.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesstring jxlsave_target() ImageAutodoc.php : 0 public jxlsave_target(Target $target[, array<string|int, mixed> $options = = '[]' ]) : void

Save image in JPEG-XL format.

Parameters
$target : Target
$options : array<string|int, mixed> = = '[]'
Lab2LabQ() ImageAutodoc.php : 0 public Lab2LabQ([array<string|int, mixed> $options = = '[]' ]) : Image

Transform float Lab to LabQ coding.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage Lab2LabS() ImageAutodoc.php : 0 public Lab2LabS([array<string|int, mixed> $options = = '[]' ]) : Image

Transform float Lab to signed short.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage Lab2LCh() ImageAutodoc.php : 0 public Lab2LCh([array<string|int, mixed> $options = = '[]' ]) : Image

Transform Lab to LCh.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage Lab2XYZ() ImageAutodoc.php : 0 public Lab2XYZ([array<string|int, mixed> $options = = '[]' ]) : Image

Transform CIELAB to XYZ.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage labelregions() ImageAutodoc.php : 0 public labelregions([array<string|int, mixed> $options = = '[]' ]) : Image

Label regions in an image.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage LabQ2Lab() ImageAutodoc.php : 0 public LabQ2Lab([array<string|int, mixed> $options = = '[]' ]) : Image

Unpack a LabQ image to float Lab.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage LabQ2LabS() ImageAutodoc.php : 0 public LabQ2LabS([array<string|int, mixed> $options = = '[]' ]) : Image

Unpack a LabQ image to short Lab.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage LabQ2sRGB() ImageAutodoc.php : 0 public LabQ2sRGB([array<string|int, mixed> $options = = '[]' ]) : Image

Convert a LabQ image to sRGB.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage LabS2Lab() ImageAutodoc.php : 0 public LabS2Lab([array<string|int, mixed> $options = = '[]' ]) : Image

Transform signed short Lab to float.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage LabS2LabQ() ImageAutodoc.php : 0 public LabS2LabQ([array<string|int, mixed> $options = = '[]' ]) : Image

Transform short Lab to LabQ coding.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage LCh2CMC() ImageAutodoc.php : 0 public LCh2CMC([array<string|int, mixed> $options = = '[]' ]) : Image

Transform LCh to CMC.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage LCh2Lab() ImageAutodoc.php : 0 public LCh2Lab([array<string|int, mixed> $options = = '[]' ]) : Image

Transform LCh to Lab.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage less() Image.php : 1849

255 where $this is less than $other.

public less(mixed $other[, array<string|int, mixed> $options = [] ]) : Image Parameters
$other : mixed

The right-hand side of the operator.

$options : array<string|int, mixed> = []

An array of options to pass to the operation.

Tags
throws
Exception
Return valuesImage

A new image.

lessEq() Image.php : 1869

255 where $this is less than or equal to $other.

public lessEq(mixed $other[, array<string|int, mixed> $options = [] ]) : Image Parameters
$other : mixed

The right-hand side of the operator.

$options : array<string|int, mixed> = []

An array of options to pass to the operation.

Tags
throws
Exception
Return valuesImage

A new image.

linear() ImageAutodoc.php : 0 public linear(array<string|int, float>|float $a, array<string|int, float>|float $b[, array<string|int, mixed> $options = = '[]' ]) : Image

Calculate (a * in + b).

Parameters
$a : array<string|int, float>|float
$b : array<string|int, float>|float
$options : array<string|int, mixed> = = '[]'
Return valuesImage linecache() ImageAutodoc.php : 0 public linecache([array<string|int, mixed> $options = = '[]' ]) : Image

Cache an image as a set of lines.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage log() Image.php : 2370

Return the natural log of an image.

public log() : Image Tags
throws
Exception
Return valuesImage

A new image.

log10() Image.php : 2382

Return the log base 10 of an image.

public log10() : Image Tags
throws
Exception
Return valuesImage

A new image.

logmat() ImageAutodoc.php : 0 public static logmat(float $sigma, float $min_ampl[, array<string|int, mixed> $options = = '[]' ]) : Image

Make a Laplacian of Gaussian image.

Parameters
$sigma : float
$min_ampl : float
$options : array<string|int, mixed> = = '[]'
Return valuesImage lshift() Image.php : 1721

Shift $this left by $other.

public lshift(mixed $other[, array<string|int, mixed> $options = [] ]) : Image Parameters
$other : mixed

The right-hand side of the operator.

$options : array<string|int, mixed> = []

An array of options to pass to the operation.

Tags
throws
Exception
Return valuesImage

A new image.

magickload() ImageAutodoc.php : 0 public static magickload(string $filename[, array<string|int, mixed> $options = = '[]' ]) : Image

Load file with ImageMagick7.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage magickload_buffer() ImageAutodoc.php : 0 public static magickload_buffer(string $buffer[, array<string|int, mixed> $options = = '[]' ]) : Image

Load buffer with ImageMagick7.

Parameters
$buffer : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage magicksave() ImageAutodoc.php : 0 public magicksave(string $filename[, array<string|int, mixed> $options = = '[]' ]) : void

Save file with ImageMagick.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
magicksave_buffer() ImageAutodoc.php : 0 public magicksave_buffer([array<string|int, mixed> $options = = '[]' ]) : string

Save image to magick buffer.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesstring mapim() ImageAutodoc.php : 0 public mapim(Image $index[, array<string|int, mixed> $options = = '[]' ]) : Image

Resample with a map image.

Parameters
$index : Image
$options : array<string|int, mixed> = = '[]'
Return valuesImage maplut() ImageAutodoc.php : 0 public maplut(Image $lut[, array<string|int, mixed> $options = = '[]' ]) : Image

Map an image though a lut.

Parameters
$lut : Image
$options : array<string|int, mixed> = = '[]'
Return valuesImage mask_butterworth() ImageAutodoc.php : 0 public static mask_butterworth(int $width, int $height, float $order, float $frequency_cutoff, float $amplitude_cutoff[, array<string|int, mixed> $options = = '[]' ]) : Image

Make a butterworth filter.

Parameters
$width : int
$height : int
$order : float
$frequency_cutoff : float
$amplitude_cutoff : float
$options : array<string|int, mixed> = = '[]'
Return valuesImage mask_butterworth_band() ImageAutodoc.php : 0 public static mask_butterworth_band(int $width, int $height, float $order, float $frequency_cutoff_x, float $frequency_cutoff_y, float $radius, float $amplitude_cutoff[, array<string|int, mixed> $options = = '[]' ]) : Image

Make a butterworth_band filter.

Parameters
$width : int
$height : int
$order : float
$frequency_cutoff_x : float
$frequency_cutoff_y : float
$radius : float
$amplitude_cutoff : float
$options : array<string|int, mixed> = = '[]'
Return valuesImage mask_butterworth_ring() ImageAutodoc.php : 0 public static mask_butterworth_ring(int $width, int $height, float $order, float $frequency_cutoff, float $amplitude_cutoff, float $ringwidth[, array<string|int, mixed> $options = = '[]' ]) : Image

Make a butterworth ring filter.

Parameters
$width : int
$height : int
$order : float
$frequency_cutoff : float
$amplitude_cutoff : float
$ringwidth : float
$options : array<string|int, mixed> = = '[]'
Return valuesImage mask_fractal() ImageAutodoc.php : 0 public static mask_fractal(int $width, int $height, float $fractal_dimension[, array<string|int, mixed> $options = = '[]' ]) : Image

Make fractal filter.

Parameters
$width : int
$height : int
$fractal_dimension : float
$options : array<string|int, mixed> = = '[]'
Return valuesImage mask_gaussian() ImageAutodoc.php : 0 public static mask_gaussian(int $width, int $height, float $frequency_cutoff, float $amplitude_cutoff[, array<string|int, mixed> $options = = '[]' ]) : Image

Make a gaussian filter.

Parameters
$width : int
$height : int
$frequency_cutoff : float
$amplitude_cutoff : float
$options : array<string|int, mixed> = = '[]'
Return valuesImage mask_gaussian_band() ImageAutodoc.php : 0 public static mask_gaussian_band(int $width, int $height, float $frequency_cutoff_x, float $frequency_cutoff_y, float $radius, float $amplitude_cutoff[, array<string|int, mixed> $options = = '[]' ]) : Image

Make a gaussian filter.

Parameters
$width : int
$height : int
$frequency_cutoff_x : float
$frequency_cutoff_y : float
$radius : float
$amplitude_cutoff : float
$options : array<string|int, mixed> = = '[]'
Return valuesImage mask_gaussian_ring() ImageAutodoc.php : 0 public static mask_gaussian_ring(int $width, int $height, float $frequency_cutoff, float $amplitude_cutoff, float $ringwidth[, array<string|int, mixed> $options = = '[]' ]) : Image

Make a gaussian ring filter.

Parameters
$width : int
$height : int
$frequency_cutoff : float
$amplitude_cutoff : float
$ringwidth : float
$options : array<string|int, mixed> = = '[]'
Return valuesImage mask_ideal() ImageAutodoc.php : 0 public static mask_ideal(int $width, int $height, float $frequency_cutoff[, array<string|int, mixed> $options = = '[]' ]) : Image

Make an ideal filter.

Parameters
$width : int
$height : int
$frequency_cutoff : float
$options : array<string|int, mixed> = = '[]'
Return valuesImage mask_ideal_band() ImageAutodoc.php : 0 public static mask_ideal_band(int $width, int $height, float $frequency_cutoff_x, float $frequency_cutoff_y, float $radius[, array<string|int, mixed> $options = = '[]' ]) : Image

Make an ideal band filter.

Parameters
$width : int
$height : int
$frequency_cutoff_x : float
$frequency_cutoff_y : float
$radius : float
$options : array<string|int, mixed> = = '[]'
Return valuesImage mask_ideal_ring() ImageAutodoc.php : 0 public static mask_ideal_ring(int $width, int $height, float $frequency_cutoff, float $ringwidth[, array<string|int, mixed> $options = = '[]' ]) : Image

Make an ideal ring filter.

Parameters
$width : int
$height : int
$frequency_cutoff : float
$ringwidth : float
$options : array<string|int, mixed> = = '[]'
Return valuesImage match() ImageAutodoc.php : 0 public match(Image $sec, int $xr1, int $yr1, int $xs1, int $ys1, int $xr2, int $yr2, int $xs2, int $ys2[, array<string|int, mixed> $options = = '[]' ]) : Image

First-order match of two images.

Parameters
$sec : Image
$xr1 : int
$yr1 : int
$xs1 : int
$ys1 : int
$xr2 : int
$yr2 : int
$xs2 : int
$ys2 : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage math() ImageAutodoc.php : 0 public math(string $math[, array<string|int, mixed> $options = = '[]' ]) : Image

Apply a math operation to an image.

Parameters
$math : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage math2() ImageAutodoc.php : 0 public math2(Image $right, string $math2[, array<string|int, mixed> $options = = '[]' ]) : Image

Binary math operations.

Parameters
$right : Image
$math2 : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage math2_const() ImageAutodoc.php : 0 public math2_const(string $math2, array<string|int, float>|float $c[, array<string|int, mixed> $options = = '[]' ]) : Image

Binary math operations with a constant.

Parameters
$math2 : string
$c : array<string|int, float>|float
$options : array<string|int, mixed> = = '[]'
Return valuesImage matload() ImageAutodoc.php : 0 public static matload(string $filename[, array<string|int, mixed> $options = = '[]' ]) : Image

Load mat from file.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage matrixinvert() ImageAutodoc.php : 0 public matrixinvert([array<string|int, mixed> $options = = '[]' ]) : Image

Invert a matrix.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage matrixload() ImageAutodoc.php : 0 public static matrixload(string $filename[, array<string|int, mixed> $options = = '[]' ]) : Image

Load matrix.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage matrixload_source() ImageAutodoc.php : 0 public static matrixload_source(Source $source[, array<string|int, mixed> $options = = '[]' ]) : Image

Load matrix.

Parameters
$source : Source
$options : array<string|int, mixed> = = '[]'
Return valuesImage matrixmultiply() ImageAutodoc.php : 0 public matrixmultiply(Image $right[, array<string|int, mixed> $options = = '[]' ]) : Image

Multiply two matrices.

Parameters
$right : Image
$options : array<string|int, mixed> = = '[]'
Return valuesImage matrixprint() ImageAutodoc.php : 0 public matrixprint([array<string|int, mixed> $options = = '[]' ]) : void

Print matrix.

Parameters
$options : array<string|int, mixed> = = '[]'
matrixsave() ImageAutodoc.php : 0 public matrixsave(string $filename[, array<string|int, mixed> $options = = '[]' ]) : void

Save image to matrix.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
matrixsave_target() ImageAutodoc.php : 0 public matrixsave_target(Target $target[, array<string|int, mixed> $options = = '[]' ]) : void

Save image to matrix.

Parameters
$target : Target
$options : array<string|int, mixed> = = '[]'
max() ImageAutodoc.php : 0 public max([array<string|int, mixed> $options = = '[]' ]) : float

Find image maximum.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesfloat maxpair() ImageAutodoc.php : 0 public maxpair(Image $right[, array<string|int, mixed> $options = = '[]' ]) : Image

Maximum of a pair of images.

Parameters
$right : Image
$options : array<string|int, mixed> = = '[]'
Return valuesImage maxpos() Image.php : 2070

Position of max is awkward with plain self::max.

public maxpos() : array<string|int, mixed> Tags
throws
Exception
Return valuesarray<string|int, mixed>

(float, int, int) The value and position of the maximum.

measure() ImageAutodoc.php : 0 public measure(int $h, int $v[, array<string|int, mixed> $options = = '[]' ]) : Image

Measure a set of patches on a color chart.

Parameters
$h : int
$v : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage median() Image.php : 2448

$size x $size median filter.

public median(int $size) : Image Parameters
$size : int

Size of median filter.

Tags
throws
Exception
Return valuesImage

A new image.

merge() ImageAutodoc.php : 0 public merge(Image $sec, string $direction, int $dx, int $dy[, array<string|int, mixed> $options = = '[]' ]) : Image

Merge two images.

Parameters
$sec : Image
$direction : string
$dx : int
$dy : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage min() ImageAutodoc.php : 0 public min([array<string|int, mixed> $options = = '[]' ]) : float

Find image minimum.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesfloat minpair() ImageAutodoc.php : 0 public minpair(Image $right[, array<string|int, mixed> $options = = '[]' ]) : Image

Minimum of a pair of images.

Parameters
$right : Image
$options : array<string|int, mixed> = = '[]'
Return valuesImage minpos() Image.php : 2087

Position of min is awkward with plain self::max.

public minpos() : array<string|int, mixed> Tags
throws
Exception
Return valuesarray<string|int, mixed>

(float, int, int) The value and position of the minimum.

more() Image.php : 1809

255 where $this is more than $other.

public more(mixed $other[, array<string|int, mixed> $options = [] ]) : Image Parameters
$other : mixed

The right-hand side of the operator.

$options : array<string|int, mixed> = []

An array of options to pass to the operation.

Tags
throws
Exception
Return valuesImage

A new image.

moreEq() Image.php : 1829

255 where $this is more than or equal to $other.

public moreEq(mixed $other[, array<string|int, mixed> $options = [] ]) : Image Parameters
$other : mixed

The right-hand side of the operator.

$options : array<string|int, mixed> = []

An array of options to pass to the operation.

Tags
throws
Exception
Return valuesImage

A new image.

morph() ImageAutodoc.php : 0 public morph(Image $mask, string $morph[, array<string|int, mixed> $options = = '[]' ]) : Image

Morphology operation.

Parameters
$mask : Image
$morph : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage mosaic() ImageAutodoc.php : 0 public mosaic(Image $sec, string $direction, int $xref, int $yref, int $xsec, int $ysec[, array<string|int, mixed> $options = = '[]' ]) : Image

Mosaic two images.

Parameters
$sec : Image
$direction : string
$xref : int
$yref : int
$xsec : int
$ysec : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage mosaic1() ImageAutodoc.php : 0 public mosaic1(Image $sec, string $direction, int $xr1, int $yr1, int $xs1, int $ys1, int $xr2, int $yr2, int $xs2, int $ys2[, array<string|int, mixed> $options = = '[]' ]) : Image

First-order mosaic of two images.

Parameters
$sec : Image
$direction : string
$xr1 : int
$yr1 : int
$xs1 : int
$ys1 : int
$xr2 : int
$yr2 : int
$xs2 : int
$ys2 : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage msb() ImageAutodoc.php : 0 public msb([array<string|int, mixed> $options = = '[]' ]) : Image

Pick most-significant byte from an image.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage multiply() Image.php : 1626

Multiply this image by $other.

public multiply(mixed $other[, array<string|int, mixed> $options = [] ]) : Image Parameters
$other : mixed

The thing to multiply this image by.

$options : array<string|int, mixed> = []

An array of options to pass to the operation.

Tags
throws
Exception
Return valuesImage

A new image.

newFromArray() Image.php : 797

Create a new Image from a php array.

public static newFromArray(array<string|int, mixed> $array[, float $scale = 1.0 ][, float $offset = 0.0 ]) : Image

2D arrays become 2D images. 1D arrays become 2D images with height 1.

Parameters
$array : array<string|int, mixed>

The array to make the image from.

$scale : float = 1.0

The "scale" metadata item. Useful for integer convolution masks.

$offset : float = 0.0

The "offset" metadata item. Useful for integer convolution masks.

Tags
throws
Exception
Return valuesImage

A new Image.

newFromBuffer() Image.php : 763

Create a new Image from a compressed image held as a string.

public static newFromBuffer(string $buffer[, string $string_options = '' ][, array<string|int, mixed> $options = [] ]) : Image Parameters
$buffer : string

The formatted image to open.

$string_options : string = ''

Any text-style options to pass to the selected loader.

$options : array<string|int, mixed> = []

Options to pass on to the load operation.

Tags
throws
Exception
Return valuesImage

A new Image.

newFromFile() Image.php : 715

Create a new Image from a file on disc.

public static newFromFile(string $name[, array<string|int, mixed> $options = [] ]) : Image

See the main libvips documentation for a more detailed explaination.

Parameters
$name : string

The file to open.

$options : array<string|int, mixed> = []

Any options to pass on to the load operation.

Tags
throws
Exception
Return valuesImage

A new Image.

newFromImage() Image.php : 895

Create a new image from a constant.

public newFromImage(mixed $value) : Image

The new image has the same width, height, format, interpretation, xres, yres, xoffset, yoffset as $this, but each pixel has the constant value $value.

Pass a single number to make a one-band image, pass an array of numbers to make an N-band image.

Parameters
$value : mixed

The value to set each pixel to.

Tags
throws
Exception
Return valuesImage

A new Image.

newFromMemory() Image.php : 843

Wraps an Image around an area of memory containing a C-style array.

public static newFromMemory(mixed $data, int $width, int $height, int $bands, string $format) : Image Parameters
$data : mixed

C-style array.

$width : int

Image width in pixels.

$height : int

Image height in pixels.

$bands : int

Number of bands.

$format : string

Band format. (@see BandFormat)

Tags
throws
Exception
Return valuesImage

A new Image.

newFromSource() Image.php : 932 public static newFromSource(Source $source[, string $string_options = '' ][, array<string|int, mixed> $options = [] ]) : self Parameters
$source : Source
$string_options : string = ''
$options : array<string|int, mixed> = []
Tags
throws
Exception
Return valuesself newInterpolator() Image.php : 874

Deprecated thing to make an interpolator.

public static newInterpolator(string $name) : Interpolate

See Interpolator::newFromName() for the new thing.

Parameters
$name : string
Return valuesInterpolate niftiload() ImageAutodoc.php : 0 public static niftiload(string $filename[, array<string|int, mixed> $options = = '[]' ]) : Image

Load NIfTI volume.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage niftiload_source() ImageAutodoc.php : 0 public static niftiload_source(Source $source[, array<string|int, mixed> $options = = '[]' ]) : Image

Load NIfTI volumes.

Parameters
$source : Source
$options : array<string|int, mixed> = = '[]'
Return valuesImage niftisave() ImageAutodoc.php : 0 public niftisave(string $filename[, array<string|int, mixed> $options = = '[]' ]) : void

Save image to nifti file.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
notEq() Image.php : 1909

255 where $this is not equal to $other.

public notEq(mixed $other[, array<string|int, mixed> $options = [] ]) : Image Parameters
$other : mixed

The right-hand side of the operator.

$options : array<string|int, mixed> = []

An array of options to pass to the operation.

Tags
throws
Exception
Return valuesImage

A new image.

offsetExists() Image.php : 1444

Does band exist in image.

public offsetExists(mixed $offset) : bool Parameters
$offset : mixed

The index to fetch.

Return valuesbool

true if the index exists.

offsetGet() Image.php : 1458

Get band from image.

public offsetGet(mixed $offset) : Image|null Parameters
$offset : mixed

The index to fetch.

Tags
throws
Exception
Return valuesImage|null

the extracted band or null.

offsetSet() Image.php : 1488

Set a band.

public offsetSet(int $offset, Image $value) : void

Use $image[1] = $other_image;' to remove band 1 from this image, replacing it with all the bands in $other_image`.

Use $image[] = $other_image;' to append all the bands in $other_imageto$image`.

Use $image[-1] = $other_image; to prepend all the bands in $other_image to $image.

You can use constants or arrays in place of $other_image. Use $image[] = 255; to append a constant 255 band, for example, or $image[1] = [1, 2]; to replace band 1 with two constant bands.

Parameters
$offset : int

The index to set.

$value : Image

The band to insert

Tags
throws
BadMethodCallException

if the offset is not integer or null

throws
Exception
offsetUnset() Image.php : 1542

Remove a band from an image.

public offsetUnset(int $offset) : void Parameters
$offset : int

The index to remove.

Tags
throws
BadMethodCallException

if there is only one band left in the image

throws
Exception
openexrload() ImageAutodoc.php : 0 public static openexrload(string $filename[, array<string|int, mixed> $options = = '[]' ]) : Image

Load an OpenEXR image.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage openslideload() ImageAutodoc.php : 0 public static openslideload(string $filename[, array<string|int, mixed> $options = = '[]' ]) : Image

Load file with OpenSlide.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage openslideload_source() ImageAutodoc.php : 0 public static openslideload_source(Source $source[, array<string|int, mixed> $options = = '[]' ]) : Image

Load source with OpenSlide.

Parameters
$source : Source
$options : array<string|int, mixed> = = '[]'
Return valuesImage orimage() Image.php : 1773

Bitwise OR of $this and $other.

public orimage(mixed $other[, array<string|int, mixed> $options = [] ]) : Image Parameters
$other : mixed

The right-hand side of the operator.

$options : array<string|int, mixed> = []

An array of options to pass to the operation.

Tags
throws
Exception
Return valuesImage

A new image.

pdfload() ImageAutodoc.php : 0 public static pdfload(string $filename[, array<string|int, mixed> $options = = '[]' ]) : Image

Load PDF from file.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage pdfload_buffer() ImageAutodoc.php : 0 public static pdfload_buffer(string $buffer[, array<string|int, mixed> $options = = '[]' ]) : Image

Load PDF from buffer.

Parameters
$buffer : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage pdfload_source() ImageAutodoc.php : 0 public static pdfload_source(Source $source[, array<string|int, mixed> $options = = '[]' ]) : Image

Load PDF from source.

Parameters
$source : Source
$options : array<string|int, mixed> = = '[]'
Return valuesImage percent() ImageAutodoc.php : 0 public percent(float $percent[, array<string|int, mixed> $options = = '[]' ]) : int

Find threshold for percent of pixels.

Parameters
$percent : float
$options : array<string|int, mixed> = = '[]'
Return valuesint perlin() ImageAutodoc.php : 0 public static perlin(int $width, int $height[, array<string|int, mixed> $options = = '[]' ]) : Image

Make a perlin noise image.

Parameters
$width : int
$height : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage phasecor() ImageAutodoc.php : 0 public phasecor(Image $in2[, array<string|int, mixed> $options = = '[]' ]) : Image

Calculate phase correlation.

Parameters
$in2 : Image
$options : array<string|int, mixed> = = '[]'
Return valuesImage pngload() ImageAutodoc.php : 0 public static pngload(string $filename[, array<string|int, mixed> $options = = '[]' ]) : Image

Load png from file.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage pngload_buffer() ImageAutodoc.php : 0 public static pngload_buffer(string $buffer[, array<string|int, mixed> $options = = '[]' ]) : Image

Load png from buffer.

Parameters
$buffer : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage pngload_source() ImageAutodoc.php : 0 public static pngload_source(Source $source[, array<string|int, mixed> $options = = '[]' ]) : Image

Load png from source.

Parameters
$source : Source
$options : array<string|int, mixed> = = '[]'
Return valuesImage pngsave() ImageAutodoc.php : 0 public pngsave(string $filename[, array<string|int, mixed> $options = = '[]' ]) : void

Save image to file as PNG.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
pngsave_buffer() ImageAutodoc.php : 0 public pngsave_buffer([array<string|int, mixed> $options = = '[]' ]) : string

Save image to buffer as PNG.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesstring pngsave_target() ImageAutodoc.php : 0 public pngsave_target(Target $target[, array<string|int, mixed> $options = = '[]' ]) : void

Save image to target as PNG.

Parameters
$target : Target
$options : array<string|int, mixed> = = '[]'
polar() Image.php : 2244

Return an image converted to polar coordinates.

public polar() : Image Tags
throws
Exception
Return valuesImage

A new image.

pow() Image.php : 1691

Find $this to the power of $other.

public pow(mixed $other[, array<string|int, mixed> $options = [] ]) : Image Parameters
$other : mixed

The right-hand side of the operator.

$options : array<string|int, mixed> = []

An array of options to pass to the operation.

Tags
throws
Exception
Return valuesImage

A new image.

ppmload() ImageAutodoc.php : 0 public static ppmload(string $filename[, array<string|int, mixed> $options = = '[]' ]) : Image

Load ppm from file.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage ppmload_buffer() ImageAutodoc.php : 0 public static ppmload_buffer(string $buffer[, array<string|int, mixed> $options = = '[]' ]) : Image

Load ppm from buffer.

Parameters
$buffer : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage ppmload_source() ImageAutodoc.php : 0 public static ppmload_source(Source $source[, array<string|int, mixed> $options = = '[]' ]) : Image

Load ppm from source.

Parameters
$source : Source
$options : array<string|int, mixed> = = '[]'
Return valuesImage ppmsave() ImageAutodoc.php : 0 public ppmsave(string $filename[, array<string|int, mixed> $options = = '[]' ]) : void

Save image to ppm file.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
ppmsave_target() ImageAutodoc.php : 0 public ppmsave_target(Target $target[, array<string|int, mixed> $options = = '[]' ]) : void

Save to ppm.

Parameters
$target : Target
$options : array<string|int, mixed> = = '[]'
premultiply() ImageAutodoc.php : 0 public premultiply([array<string|int, mixed> $options = = '[]' ]) : Image

Premultiply image alpha.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage prewitt() ImageAutodoc.php : 0 public prewitt([array<string|int, mixed> $options = = '[]' ]) : Image

Prewitt edge detector.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage printAll() VipsObject.php : 78 public static printAll() : void profile() ImageAutodoc.php : 0 public profile([array<string|int, mixed> $options = = '[]' ]) : array<string|int, mixed>

Find image profiles. Return array with: [ 'columns' => @type Image First non-zero pixel in column 'rows' => @type Image First non-zero pixel in row ];

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesarray<string|int, mixed> profile_load() ImageAutodoc.php : 0 public static profile_load(string $name[, array<string|int, mixed> $options = = '[]' ]) : string

Load named ICC profile.

Parameters
$name : string
$options : array<string|int, mixed> = = '[]'
Return valuesstring project() ImageAutodoc.php : 0 public project([array<string|int, mixed> $options = = '[]' ]) : array<string|int, mixed>

Find image projections. Return array with: [ 'columns' => @type Image Sums of columns 'rows' => @type Image Sums of rows ];

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesarray<string|int, mixed> quadratic() ImageAutodoc.php : 0 public quadratic(Image $coeff[, array<string|int, mixed> $options = = '[]' ]) : Image

Resample an image with a quadratic transform.

Parameters
$coeff : Image
$options : array<string|int, mixed> = = '[]'
Return valuesImage rad2float() ImageAutodoc.php : 0 public rad2float([array<string|int, mixed> $options = = '[]' ]) : Image

Unpack Radiance coding to float RGB.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage radload() ImageAutodoc.php : 0 public static radload(string $filename[, array<string|int, mixed> $options = = '[]' ]) : Image

Load a Radiance image from a file.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage radload_buffer() ImageAutodoc.php : 0 public static radload_buffer(string $buffer[, array<string|int, mixed> $options = = '[]' ]) : Image

Load rad from buffer.

Parameters
$buffer : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage radload_source() ImageAutodoc.php : 0 public static radload_source(Source $source[, array<string|int, mixed> $options = = '[]' ]) : Image

Load rad from source.

Parameters
$source : Source
$options : array<string|int, mixed> = = '[]'
Return valuesImage radsave() ImageAutodoc.php : 0 public radsave(string $filename[, array<string|int, mixed> $options = = '[]' ]) : void

Save image to Radiance file.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
radsave_buffer() ImageAutodoc.php : 0 public radsave_buffer([array<string|int, mixed> $options = = '[]' ]) : string

Save image to Radiance buffer.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesstring radsave_target() ImageAutodoc.php : 0 public radsave_target(Target $target[, array<string|int, mixed> $options = = '[]' ]) : void

Save image to Radiance target.

Parameters
$target : Target
$options : array<string|int, mixed> = = '[]'
rank() ImageAutodoc.php : 0 public rank(int $width, int $height, int $index[, array<string|int, mixed> $options = = '[]' ]) : Image

Rank filter.

Parameters
$width : int
$height : int
$index : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage rawload() ImageAutodoc.php : 0 public static rawload(string $filename, int $width, int $height, int $bands[, array<string|int, mixed> $options = = '[]' ]) : Image

Load raw data from a file.

Parameters
$filename : string
$width : int
$height : int
$bands : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage rawsave() ImageAutodoc.php : 0 public rawsave(string $filename[, array<string|int, mixed> $options = = '[]' ]) : void

Save image to raw file.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
rawsave_buffer() ImageAutodoc.php : 0 public rawsave_buffer([array<string|int, mixed> $options = = '[]' ]) : string

Write raw image to buffer.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesstring rawsave_target() ImageAutodoc.php : 0 public rawsave_target(Target $target[, array<string|int, mixed> $options = = '[]' ]) : void

Write raw image to target.

Parameters
$target : Target
$options : array<string|int, mixed> = = '[]'
real() Image.php : 2220

Return the real part of a complex image.

public real() : Image Tags
throws
Exception
Return valuesImage

A new image.

recomb() ImageAutodoc.php : 0 public recomb(Image $m[, array<string|int, mixed> $options = = '[]' ]) : Image

Linear recombination with matrix.

Parameters
$m : Image
$options : array<string|int, mixed> = = '[]'
Return valuesImage rect() Image.php : 2258

Return an image converted to rectangular coordinates.

public rect() : Image Tags
throws
Exception
Return valuesImage

A new image.

reduce() ImageAutodoc.php : 0 public reduce(float $hshrink, float $vshrink[, array<string|int, mixed> $options = = '[]' ]) : Image

Reduce an image.

Parameters
$hshrink : float
$vshrink : float
$options : array<string|int, mixed> = = '[]'
Return valuesImage reduceh() ImageAutodoc.php : 0 public reduceh(float $hshrink[, array<string|int, mixed> $options = = '[]' ]) : Image

Shrink an image horizontally.

Parameters
$hshrink : float
$options : array<string|int, mixed> = = '[]'
Return valuesImage reducev() ImageAutodoc.php : 0 public reducev(float $vshrink[, array<string|int, mixed> $options = = '[]' ]) : Image

Shrink an image vertically.

Parameters
$vshrink : float
$options : array<string|int, mixed> = = '[]'
Return valuesImage ref() GObject.php : 98 public ref() : void relational() ImageAutodoc.php : 0 public relational(Image $right, string $relational[, array<string|int, mixed> $options = = '[]' ]) : Image

Relational operation on two images.

Parameters
$right : Image
$relational : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage relational_const() ImageAutodoc.php : 0 public relational_const(string $relational, array<string|int, float>|float $c[, array<string|int, mixed> $options = = '[]' ]) : Image

Relational operations against a constant.

Parameters
$relational : string
$c : array<string|int, float>|float
$options : array<string|int, mixed> = = '[]'
Return valuesImage remainder() Image.php : 1667

Remainder of this image and $other.

public remainder(mixed $other[, array<string|int, mixed> $options = [] ]) : Image Parameters
$other : mixed

The thing to take the remainder with.

$options : array<string|int, mixed> = []

An array of options to pass to the operation.

Tags
throws
Exception
Return valuesImage

A new image.

remainder_const() ImageAutodoc.php : 0 public remainder_const(array<string|int, float>|float $c[, array<string|int, mixed> $options = = '[]' ]) : Image

Remainder after integer division of an image and a constant.

Parameters
$c : array<string|int, float>|float
$options : array<string|int, mixed> = = '[]'
Return valuesImage remosaic() ImageAutodoc.php : 0 public remosaic(string $old_str, string $new_str[, array<string|int, mixed> $options = = '[]' ]) : Image

Rebuild an mosaiced image.

Parameters
$old_str : string
$new_str : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage remove() Image.php : 1350

Remove a field from the underlying image.

public remove(string $name) : void Parameters
$name : string

The property name.

Tags
throws
Exception
replicate() ImageAutodoc.php : 0 public replicate(int $across, int $down[, array<string|int, mixed> $options = = '[]' ]) : Image

Replicate an image.

Parameters
$across : int
$down : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage resize() ImageAutodoc.php : 0 public resize(float $scale[, array<string|int, mixed> $options = = '[]' ]) : Image

Resize an image.

Parameters
$scale : float
$options : array<string|int, mixed> = = '[]'
Return valuesImage rint() Image.php : 2170

Return the nearest integral value.

public rint() : Image Tags
throws
Exception
Return valuesImage

A new image.

rot() ImageAutodoc.php : 0 public rot(string $angle[, array<string|int, mixed> $options = = '[]' ]) : Image

Rotate an image.

Parameters
$angle : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage rot180() Image.php : 2496

Rotate 180 degrees.

public rot180() : Image Tags
throws
Exception
Return valuesImage

A new image.

rot270() Image.php : 2508

Rotate 270 degrees clockwise.

public rot270() : Image Tags
throws
Exception
Return valuesImage

A new image.

rot45() ImageAutodoc.php : 0 public rot45([array<string|int, mixed> $options = = '[]' ]) : Image

Rotate an image.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage rot90() Image.php : 2484

Rotate 90 degrees clockwise.

public rot90() : Image Tags
throws
Exception
Return valuesImage

A new image.

rotate() ImageAutodoc.php : 0 public rotate(float $angle[, array<string|int, mixed> $options = = '[]' ]) : Image

Rotate an image by a number of degrees.

Parameters
$angle : float
$options : array<string|int, mixed> = = '[]'
Return valuesImage round() ImageAutodoc.php : 0 public round(string $round[, array<string|int, mixed> $options = = '[]' ]) : Image

Perform a round function on an image.

Parameters
$round : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage rshift() Image.php : 1736

Shift $this right by $other.

public rshift(mixed $other[, array<string|int, mixed> $options = [] ]) : Image Parameters
$other : mixed

The right-hand side of the operator.

$options : array<string|int, mixed> = []

An array of options to pass to the operation.

Tags
throws
Exception
Return valuesImage

A new image.

scale() ImageAutodoc.php : 0 public scale([array<string|int, mixed> $options = = '[]' ]) : Image

Scale an image to uchar.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage scharr() ImageAutodoc.php : 0 public scharr([array<string|int, mixed> $options = = '[]' ]) : Image

Scharr edge detector.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage scRGB2BW() ImageAutodoc.php : 0 public scRGB2BW([array<string|int, mixed> $options = = '[]' ]) : Image

Convert scRGB to BW.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage scRGB2sRGB() ImageAutodoc.php : 0 public scRGB2sRGB([array<string|int, mixed> $options = = '[]' ]) : Image

Convert scRGB to sRGB.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage scRGB2XYZ() ImageAutodoc.php : 0 public scRGB2XYZ([array<string|int, mixed> $options = = '[]' ]) : Image

Transform scRGB to XYZ.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage sdf() ImageAutodoc.php : 0 public static sdf(int $width, int $height, string $shape[, array<string|int, mixed> $options = = '[]' ]) : Image

Create an SDF image.

Parameters
$width : int
$height : int
$shape : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage sequential() ImageAutodoc.php : 0 public sequential([array<string|int, mixed> $options = = '[]' ]) : Image

Check sequential access.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage set() Image.php : 1283

Set any property on the underlying image.

public set(string $name, mixed $value) : void

This is handy for fields whose name does not match PHP's variable naming conventions, like 'exif-data'.

Parameters
$name : string

The property name.

$value : mixed

The value to set for this property.

Tags
throws
Exception
setProgress() Image.php : 1368

Enable progress reporting on an image.

public setProgress(bool $progress) : void

The preeval, eval and posteval signals will be emitted on the most-downstream image for which setProgress() was enabled. @see GObject::signalConnect().

Parameters
$progress : bool

TRUE to enable progress reporting.

setString() VipsObject.php : 186 public setString(string $string_options) : bool Parameters
$string_options : string
Return valuesbool setType() Image.php : 1333

Set the type and value for any property on the underlying image.

public setType(string|int $type, string $name, mixed $value) : void

This is useful if the type of the property cannot be determined from the php type of the value.

Pass the type name directly, or use Utils::typeFromName() to look up types by name.

Parameters
$type : string|int

The type of the property.

$name : string

The property name.

$value : mixed

The value to set for this property.

Tags
throws
Exception
sharpen() ImageAutodoc.php : 0 public sharpen([array<string|int, mixed> $options = = '[]' ]) : Image

Unsharp masking for print.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage shrink() ImageAutodoc.php : 0 public shrink(float $hshrink, float $vshrink[, array<string|int, mixed> $options = = '[]' ]) : Image

Shrink an image.

Parameters
$hshrink : float
$vshrink : float
$options : array<string|int, mixed> = = '[]'
Return valuesImage shrinkh() ImageAutodoc.php : 0 public shrinkh(int $hshrink[, array<string|int, mixed> $options = = '[]' ]) : Image

Shrink an image horizontally.

Parameters
$hshrink : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage shrinkv() ImageAutodoc.php : 0 public shrinkv(int $vshrink[, array<string|int, mixed> $options = = '[]' ]) : Image

Shrink an image vertically.

Parameters
$vshrink : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage sign() ImageAutodoc.php : 0 public sign([array<string|int, mixed> $options = = '[]' ]) : Image

Unit vector of pixel.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage signalConnect() GObject.php : 113

Connect to a signal on this object.

public signalConnect(string $name, callable $callback) : void

The callback will be triggered every time this signal is issued on this instance.

Parameters
$name : string
$callback : callable
Tags
throws
Exception
similarity() ImageAutodoc.php : 0 public similarity([array<string|int, mixed> $options = = '[]' ]) : Image

Similarity transform of an image.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage sin() Image.php : 2298

Return the sine of an image in degrees.

public sin() : Image Tags
throws
Exception
Return valuesImage

A new image.

sines() ImageAutodoc.php : 0 public static sines(int $width, int $height[, array<string|int, mixed> $options = = '[]' ]) : Image

Make a 2D sine wave.

Parameters
$width : int
$height : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage smartcrop() ImageAutodoc.php : 0 public smartcrop(int $width, int $height[, array<string|int, mixed> $options = = '[]' ]) : Image

Extract an area from an image.

Parameters
$width : int
$height : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage sobel() ImageAutodoc.php : 0 public sobel([array<string|int, mixed> $options = = '[]' ]) : Image

Sobel edge detector.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage spcor() ImageAutodoc.php : 0 public spcor(Image $ref[, array<string|int, mixed> $options = = '[]' ]) : Image

Spatial correlation.

Parameters
$ref : Image
$options : array<string|int, mixed> = = '[]'
Return valuesImage spectrum() ImageAutodoc.php : 0 public spectrum([array<string|int, mixed> $options = = '[]' ]) : Image

Make displayable power spectrum.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage sRGB2HSV() ImageAutodoc.php : 0 public sRGB2HSV([array<string|int, mixed> $options = = '[]' ]) : Image

Transform sRGB to HSV.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage sRGB2scRGB() ImageAutodoc.php : 0 public sRGB2scRGB([array<string|int, mixed> $options = = '[]' ]) : Image

Convert an sRGB image to scRGB.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage stats() ImageAutodoc.php : 0 public stats([array<string|int, mixed> $options = = '[]' ]) : Image

Find many image stats.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage stdif() ImageAutodoc.php : 0 public stdif(int $width, int $height[, array<string|int, mixed> $options = = '[]' ]) : Image

Statistical difference.

Parameters
$width : int
$height : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage subsample() ImageAutodoc.php : 0 public subsample(int $xfac, int $yfac[, array<string|int, mixed> $options = = '[]' ]) : Image

Subsample an image.

Parameters
$xfac : int
$yfac : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage subtract() Image.php : 1604

Subtract $other from this image.

public subtract(mixed $other[, array<string|int, mixed> $options = [] ]) : Image Parameters
$other : mixed

The thing to subtract from this image.

$options : array<string|int, mixed> = []

An array of options to pass to the operation.

Tags
throws
Exception
Return valuesImage

A new image.

sum() ImageAutodoc.php : 0 public static sum(array<string|int, Image>|Image $in[, array<string|int, mixed> $options = = '[]' ]) : Image

Sum an array of images.

Parameters
$in : array<string|int, Image>|Image
$options : array<string|int, mixed> = = '[]'
Return valuesImage svgload() ImageAutodoc.php : 0 public static svgload(string $filename[, array<string|int, mixed> $options = = '[]' ]) : Image

Load SVG with rsvg.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage svgload_buffer() ImageAutodoc.php : 0 public static svgload_buffer(string $buffer[, array<string|int, mixed> $options = = '[]' ]) : Image

Load SVG with rsvg.

Parameters
$buffer : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage svgload_source() ImageAutodoc.php : 0 public static svgload_source(Source $source[, array<string|int, mixed> $options = = '[]' ]) : Image

Load svg from source.

Parameters
$source : Source
$options : array<string|int, mixed> = = '[]'
Return valuesImage switch() ImageAutodoc.php : 0 public static switch(array<string|int, Image>|Image $tests[, array<string|int, mixed> $options = = '[]' ]) : Image

Find the index of the first non-zero pixel in tests.

Parameters
$tests : array<string|int, Image>|Image
$options : array<string|int, mixed> = = '[]'
Return valuesImage system() ImageAutodoc.php : 0 public static system(string $cmd_format[, array<string|int, mixed> $options = = '[]' ]) : void

Run an external command.

Parameters
$cmd_format : string
$options : array<string|int, mixed> = = '[]'
tan() Image.php : 2322

Return the tangent of an image in degrees.

public tan() : Image Tags
throws
Exception
Return valuesImage

A new image.

text() ImageAutodoc.php : 0 public static text(string $text[, array<string|int, mixed> $options = = '[]' ]) : Image

Make a text image.

Parameters
$text : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage thumbnail() ImageAutodoc.php : 0 public static thumbnail(string $filename, int $width[, array<string|int, mixed> $options = = '[]' ]) : Image

Generate thumbnail from file.

Parameters
$filename : string
$width : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage thumbnail_buffer() ImageAutodoc.php : 0 public static thumbnail_buffer(string $buffer, int $width[, array<string|int, mixed> $options = = '[]' ]) : Image

Generate thumbnail from buffer.

Parameters
$buffer : string
$width : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage thumbnail_image() ImageAutodoc.php : 0 public thumbnail_image(int $width[, array<string|int, mixed> $options = = '[]' ]) : Image

Generate thumbnail from image.

Parameters
$width : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage thumbnail_source() ImageAutodoc.php : 0 public static thumbnail_source(Source $source, int $width[, array<string|int, mixed> $options = = '[]' ]) : Image

Generate thumbnail from source.

Parameters
$source : Source
$width : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage tiffload() ImageAutodoc.php : 0 public static tiffload(string $filename[, array<string|int, mixed> $options = = '[]' ]) : Image

Load tiff from file.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage tiffload_buffer() ImageAutodoc.php : 0 public static tiffload_buffer(string $buffer[, array<string|int, mixed> $options = = '[]' ]) : Image

Load tiff from buffer.

Parameters
$buffer : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage tiffload_source() ImageAutodoc.php : 0 public static tiffload_source(Source $source[, array<string|int, mixed> $options = = '[]' ]) : Image

Load tiff from source.

Parameters
$source : Source
$options : array<string|int, mixed> = = '[]'
Return valuesImage tiffsave() ImageAutodoc.php : 0 public tiffsave(string $filename[, array<string|int, mixed> $options = = '[]' ]) : void

Save image to tiff file.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
tiffsave_buffer() ImageAutodoc.php : 0 public tiffsave_buffer([array<string|int, mixed> $options = = '[]' ]) : string

Save image to tiff buffer.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesstring tiffsave_target() ImageAutodoc.php : 0 public tiffsave_target(Target $target[, array<string|int, mixed> $options = = '[]' ]) : void

Save image to tiff target.

Parameters
$target : Target
$options : array<string|int, mixed> = = '[]'
tilecache() ImageAutodoc.php : 0 public tilecache([array<string|int, mixed> $options = = '[]' ]) : Image

Cache an image as a set of tiles.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage tonelut() ImageAutodoc.php : 0 public static tonelut([array<string|int, mixed> $options = = '[]' ]) : Image

Build a look-up table.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage transpose3d() ImageAutodoc.php : 0 public transpose3d([array<string|int, mixed> $options = = '[]' ]) : Image

Transpose3d an image.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage typeOf() Image.php : 1246

A deprecated synonym for getType().

public typeOf(string $name) : int Parameters
$name : string

The property name.

Return valuesint unpremultiply() ImageAutodoc.php : 0 public unpremultiply([array<string|int, mixed> $options = = '[]' ]) : Image

Unpremultiply image alpha.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage unref() GObject.php : 103 public unref() : void unrefOutputs() VipsObject.php : 194 public unrefOutputs() : void vipsload() ImageAutodoc.php : 0 public static vipsload(string $filename[, array<string|int, mixed> $options = = '[]' ]) : Image

Load vips from file.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage vipsload_source() ImageAutodoc.php : 0 public static vipsload_source(Source $source[, array<string|int, mixed> $options = = '[]' ]) : Image

Load vips from source.

Parameters
$source : Source
$options : array<string|int, mixed> = = '[]'
Return valuesImage vipssave() ImageAutodoc.php : 0 public vipssave(string $filename[, array<string|int, mixed> $options = = '[]' ]) : void

Save image to file in vips format.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
vipssave_target() ImageAutodoc.php : 0 public vipssave_target(Target $target[, array<string|int, mixed> $options = = '[]' ]) : void

Save image to target in vips format.

Parameters
$target : Target
$options : array<string|int, mixed> = = '[]'
webpload() ImageAutodoc.php : 0 public static webpload(string $filename[, array<string|int, mixed> $options = = '[]' ]) : Image

Load webp from file.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage webpload_buffer() ImageAutodoc.php : 0 public static webpload_buffer(string $buffer[, array<string|int, mixed> $options = = '[]' ]) : Image

Load webp from buffer.

Parameters
$buffer : string
$options : array<string|int, mixed> = = '[]'
Return valuesImage webpload_source() ImageAutodoc.php : 0 public static webpload_source(Source $source[, array<string|int, mixed> $options = = '[]' ]) : Image

Load webp from source.

Parameters
$source : Source
$options : array<string|int, mixed> = = '[]'
Return valuesImage webpsave() ImageAutodoc.php : 0 public webpsave(string $filename[, array<string|int, mixed> $options = = '[]' ]) : void

Save as WebP.

Parameters
$filename : string
$options : array<string|int, mixed> = = '[]'
webpsave_buffer() ImageAutodoc.php : 0 public webpsave_buffer([array<string|int, mixed> $options = = '[]' ]) : string

Save as WebP.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesstring webpsave_mime() ImageAutodoc.php : 0 public webpsave_mime([array<string|int, mixed> $options = = '[]' ]) : void

Save image to webp mime.

Parameters
$options : array<string|int, mixed> = = '[]'
webpsave_target() ImageAutodoc.php : 0 public webpsave_target(Target $target[, array<string|int, mixed> $options = = '[]' ]) : void

Save as WebP.

Parameters
$target : Target
$options : array<string|int, mixed> = = '[]'
wop() Image.php : 1706

Find $other to the power of $this.

public wop(mixed $other[, array<string|int, mixed> $options = [] ]) : Image Parameters
$other : mixed

The right-hand side of the operator.

$options : array<string|int, mixed> = []

An array of options to pass to the operation.

Tags
throws
Exception
Return valuesImage

A new image.

worley() ImageAutodoc.php : 0 public static worley(int $width, int $height[, array<string|int, mixed> $options = = '[]' ]) : Image

Make a worley noise image.

Parameters
$width : int
$height : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage wrap() ImageAutodoc.php : 0 public wrap([array<string|int, mixed> $options = = '[]' ]) : Image

Wrap image origin.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage writeToArray() Image.php : 1087

Write an image to a PHP array.

public writeToArray() : array<string|int, mixed>

Pixels are written as a simple one-dimensional array, for example, if you write:

$result = $image->crop(100, 100, 10, 1)->writeToArray();

This will crop out 10 pixels and write them to the array. If $image is an RGB image, then $array will contain 30 numbers, with the first three being R, G and B for the first pixel.

You'll need to slice and repack the array if you want more dimensions.

This method is much faster than repeatedly calling getpoint(). It will use a lot of memory.

Tags
throws
Exception
Return valuesarray<string|int, mixed>

The pixel values as a PHP array.

writeToBuffer() Image.php : 993

Write an image to a formatted string.

public writeToBuffer(string $suffix[, array<string|int, mixed> $options = [] ]) : string Parameters
$suffix : string

The file type suffix, eg. ".jpg".

$options : array<string|int, mixed> = []

Any options to pass on to the selected save operation.

Tags
throws
Exception
Return valuesstring

The formatted image.

writeToFile() Image.php : 959

Write an image to a file.

public writeToFile(string $name[, array<string|int, mixed> $options = [] ]) : void Parameters
$name : string

The file to write the image to.

$options : array<string|int, mixed> = []

Any options to pass on to the selected save operation.

Tags
throws
Exception
writeToMemory() Image.php : 1046

Write an image to a large memory array.

public writeToMemory() : string Tags
throws
Exception
Return valuesstring

The memory array.

writeToTarget() Image.php : 1117 public writeToTarget(Target $target, string $suffix[, array<string|int, mixed> $options = [] ]) : void Parameters
$target : Target
$suffix : string
$options : array<string|int, mixed> = []
Tags
throws
Exception
xyz() ImageAutodoc.php : 0 public static xyz(int $width, int $height[, array<string|int, mixed> $options = = '[]' ]) : Image

Make an image where pixel values are coordinates.

Parameters
$width : int
$height : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage XYZ2CMYK() ImageAutodoc.php : 0 public XYZ2CMYK([array<string|int, mixed> $options = = '[]' ]) : Image

Transform XYZ to CMYK.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage XYZ2Lab() ImageAutodoc.php : 0 public XYZ2Lab([array<string|int, mixed> $options = = '[]' ]) : Image

Transform XYZ to Lab.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage XYZ2scRGB() ImageAutodoc.php : 0 public XYZ2scRGB([array<string|int, mixed> $options = = '[]' ]) : Image

Transform XYZ to scRGB.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage XYZ2Yxy() ImageAutodoc.php : 0 public XYZ2Yxy([array<string|int, mixed> $options = = '[]' ]) : Image

Transform XYZ to Yxy.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage Yxy2XYZ() ImageAutodoc.php : 0 public Yxy2XYZ([array<string|int, mixed> $options = = '[]' ]) : Image

Transform Yxy to XYZ.

Parameters
$options : array<string|int, mixed> = = '[]'
Return valuesImage zone() ImageAutodoc.php : 0 public static zone(int $width, int $height[, array<string|int, mixed> $options = = '[]' ]) : Image

Make a zone plate.

Parameters
$width : int
$height : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage zoom() ImageAutodoc.php : 0 public zoom(int $xfac, int $yfac[, array<string|int, mixed> $options = = '[]' ]) : Image

Zoom an image.

Parameters
$xfac : int
$yfac : int
$options : array<string|int, mixed> = = '[]'
Return valuesImage getMarshaler() GObject.php : 135 private static getMarshaler(string $name, callable $callback) : Closure|null Parameters
$name : string
$callback : callable
Return valuesClosure|null

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4