Class

VipsImage

Description [src]

class Vips.Image : Vips.Object {
  parent_instance: VipsObject
}

An image. These can represent an image on disc, a memory buffer, an image in the process of being written to disc or a partially evaluated image in memory.

Hierarchy

hierarchy this VipsImage ancestor_0 VipsObject ancestor_0--this ancestor_1 GObject ancestor_1--ancestor_0

Ancestors

Constructors

vips_image_memory

A renamed vips_image_new_memory() … Some gobject binding systems do not like more than one _new() method.

vips_image_new

Vips_image_new() creates a new, empty VipsImage. If you write to one of these images, vips will just attach some callbacks, no pixels will be generated.

vips_image_new_from_buffer

Loads an image from the formatted area of memory buf, len using the loader recommended by vips_foreign_find_load_buffer(). To load an unformatted area of memory, use vips_image_new_from_memory().

vips_image_new_from_file

Optional arguments:

vips_image_new_from_file_RW

Opens the named file for simultaneous reading and writing. This will only work for VIPS files in a format native to your machine. It is only for paintbox-type applications.

vips_image_new_from_file_raw

This function maps the named file and returns a VipsImage you can use to read it.

vips_image_new_from_image

Creates a new image with width, height, format, interpretation, resolution and offset taken from image, but with number of bands taken from n and the value of each band element set from c.

vips_image_new_from_image1

Creates a new image with width, height, format, interpretation, resolution and offset taken from image, but with one band and each pixel having the value c.

vips_image_new_from_memory

This function wraps a VipsImage around a memory area. The memory area must be a simple array, for example RGBRGBRGB, left-to-right, top-to-bottom. Use vips_image_new_from_buffer() to load an area of memory containing an image in a format.

vips_image_new_from_memory_copy

Like vips_image_new_from_memory(), but VIPS will make a copy of the memory area. This means more memory use and an extra copy operation, but is much simpler and safer.

vips_image_new_from_source

Loads an image from the formatted source input, loader recommended by vips_foreign_find_load_source().

vips_image_new_matrix

This convenience function makes an image which is a matrix: a one-band

VIPS_FORMAT_DOUBLE image held in memory.

vips_image_new_matrix_from_array

A binding-friendly version of vips_image_new_matrixv().

vips_image_new_matrixv

As vips_image_new_matrix(), but initialise the matrix from the argument list. After height should be width * height double constants which are used to set the matrix elements.

vips_image_new_memory

Vips_image_new_memory() creates a new VipsImage which, when written to, will create a memory image.

vips_image_new_temp_file

Make a VipsImage which, when written to, will create a temporary file on disc. The file will be automatically deleted when the image is destroyed. format is something like “%s.v” for a vips file.

Functions

vips_image_get_format_max
No description available.
vips_image_matrix_from_array

A renamed vips_image_new_matrix_from_array(). Some gobject bindings do not like more than one _new method.

Instance methods

vips_CMC2LCh

Turn LCh to CMC.

vips_CMYK2XYZ

Turn CMYK to XYZ. If the image has an embedded ICC profile this will be used for the conversion. If there is no embedded profile, a generic fallback profile will be used.

vips_HSV2sRGB

Convert HSV to sRGB.

vips_LCh2CMC

Turn LCh to CMC.

vips_LCh2Lab

Turn LCh to Lab.

vips_Lab2LCh

Turn Lab to LCh.

vips_Lab2LabQ

Convert a Lab three-band float image to LabQ (#VIPS_CODING_LABQ).

vips_Lab2LabS

Turn Lab to LabS, signed 16-bit int fixed point.

vips_Lab2XYZ

Optional arguments:

vips_LabQ2Lab

Unpack a LabQ (#VIPS_CODING_LABQ) image to a three-band float image.

vips_LabQ2LabS

Unpack a LabQ (#VIPS_CODING_LABQ) image to a three-band short image.

vips_LabQ2sRGB

Unpack a LabQ (#VIPS_CODING_LABQ) image to a three-band short image.

vips_LabS2Lab

Convert a LabS three-band signed short image to a three-band float image.

vips_LabS2LabQ

Convert a LabS three-band signed short image to LabQ.

vips_XYZ2CMYK

Turn XYZ to CMYK. If the image has an embedded ICC profile this will be used for the conversion. If there is no embedded profile, a generic fallback profile will be used.

vips_XYZ2Lab

Optional arguments:

vips_XYZ2Yxy

Turn XYZ to Yxy.

vips_XYZ2scRGB

Turn XYZ to scRGB.

vips_Yxy2XYZ

Turn XYZ to Yxy.

vips_abs

This operation finds the absolute value of an image. It does a copy for unsigned integer types, negate for negative values in signed integer types, fabs(3) for float types, and calculates modulus for complex types.

vips_acos

Perform #VIPS_OPERATION_MATH_ACOS on an image. See vips_math().

vips_acosh

Perform #VIPS_OPERATION_MATH_ACOSH on an image. See vips_math().

vips_add

This operation calculates in1 + in2 and writes the result to out.

vips_addalpha

Append an alpha channel.

vips_affine

Optional arguments:

vips_andimage

Perform #VIPS_OPERATION_BOOLEAN_AND on a pair of images. See vips_boolean().

vips_andimage_const

Perform #VIPS_OPERATION_BOOLEAN_AND on an image and an array of constants. See vips_boolean_const().

vips_andimage_const1

Perform #VIPS_OPERATION_BOOLEAN_AND on an image and a constant. See vips_boolean_const1().

vips_asin

Perform #VIPS_OPERATION_MATH_ASIN on an image. See vips_math().

vips_asinh

Perform #VIPS_OPERATION_MATH_ASINH on an image. See vips_math().

vips_atan

Perform #VIPS_OPERATION_MATH_ATAN on an image. See vips_math().

vips_atan2

Perform #VIPS_OPERATION_MATH2_ATAN2 on a pair of images. See vips_math2().

vips_atan2_const

Perform #VIPS_OPERATION_MATH2_ATAN2 on an image and a constant. See vips_math2_const().

vips_atan2_const1

Perform #VIPS_OPERATION_MATH2_ATAN2 on an image and a constant. See vips_math2_const().

vips_atanh

Perform #VIPS_OPERATION_MATH_ATANH on an image. See vips_math().

vips_autorot

Optional arguments:

vips_autorot_remove_angle

Remove the orientation tag on image. Also remove any exif orientation tags. You must vips_copy() the image before calling this function since it modifies metadata.

vips_avg

This operation finds the average value in an image. It operates on all bands of the input image: use vips_stats() if you need to calculate an average for each band. For complex images, return the average modulus.

vips_bandand

Perform #VIPS_OPERATION_BOOLEAN_AND on an image. See vips_bandbool().

vips_bandbool

Perform various boolean operations across the bands of an image. For example, a three-band uchar image operated on with

VIPS_OPERATION_BOOLEAN_AND will produce a one-band uchar image where each

pixel is the bitwise and of the band elements of the corresponding pixel in the input image.

vips_bandeor

Perform #VIPS_OPERATION_BOOLEAN_EOR on an image. See vips_bandbool().

vips_bandfold

Optional arguments:

vips_bandjoin2

Join a pair of images together, bandwise. See vips_bandjoin().

vips_bandjoin_const

Append a set of constant bands to an image.

vips_bandjoin_const1

Append a single constant band to an image.

vips_bandmean

This operation writes a one-band image where each pixel is the average of the bands for that pixel in the input image. The output band format is the same as the input band format. Integer types use round-to-nearest averaging.

vips_bandor

Perform #VIPS_OPERATION_BOOLEAN_OR on an image. See vips_bandbool().

vips_bandunfold

Optional arguments:

vips_boolean

Perform various boolean operations on pairs of images.

vips_boolean_const

Perform various boolean operations on an image against an array of constants.

vips_boolean_const1

Perform various boolean operations on an image with a single constant. See vips_boolean_const().

vips_byteswap

Swap the byte order in an image.

vips_cache

Optional arguments:

vips_canny

Optional arguments:

vips_case

Use values in index to select pixels from cases.

vips_cast

Optional arguments:

vips_cast_char

Convert in to #VIPS_FORMAT_CHAR. See vips_cast().

vips_cast_complex

Convert in to #VIPS_FORMAT_COMPLEX. See vips_cast().

vips_cast_double

Convert in to #VIPS_FORMAT_DOUBLE. See vips_cast().

vips_cast_dpcomplex

Convert in to #VIPS_FORMAT_DPCOMPLEX. See vips_cast().

vips_cast_float

Convert in to #VIPS_FORMAT_FLOAT. See vips_cast().

vips_cast_int

Convert in to #VIPS_FORMAT_INT. See vips_cast().

vips_cast_short

Convert in to #VIPS_FORMAT_SHORT. See vips_cast().

vips_cast_uchar

Convert in to #VIPS_FORMAT_UCHAR. See vips_cast().

vips_cast_uint

Convert in to #VIPS_FORMAT_UINT. See vips_cast().

vips_cast_ushort

Convert in to #VIPS_FORMAT_USHORT. See vips_cast().

vips_ceil

Round to an integral value with #VIPS_OPERATION_ROUND_CEIL. See vips_round().

vips_colourspace

Optional arguments:

vips_colourspace_issupported

Test if image is in a colourspace that vips_colourspace() can process.

vips_compass

Optional arguments:

vips_complex

Perform various operations on complex images.

vips_complex2

Perform various binary operations on complex images.

vips_complexform

Compose two real images to make a complex image. If either left or right are #VIPS_FORMAT_DOUBLE, out is #VIPS_FORMAT_DPCOMPLEX. Otherwise out is #VIPS_FORMAT_COMPLEX. left becomes the real component of out and right the imaginary.

vips_complexget

Get components of complex images.

vips_composite2

Optional arguments:

vips_conj

Perform #VIPS_OPERATION_COMPLEX_CONJ on an image. See vips_complex().

vips_conv

Optional arguments:

vips_conva

Optional arguments:

vips_convasep

Optional arguments:

vips_convf

Convolution. This is a low-level operation, see vips_conv() for something more convenient.

vips_convi

Integer convolution. This is a low-level operation, see vips_conv() for something more convenient.

vips_convsep

Optional arguments:

vips_copy

Optional arguments:

vips_copy_file

A simple convenience function to copy an image to a file, then copy again to output. If the image is already a file, just copy straight through.

vips_image_copy_memory

This function allocates memory, renders image into it, builds a new image around the memory area, and returns that.

vips_cos

Perform #VIPS_OPERATION_MATH_COS on an image. See vips_math().

vips_cosh

Perform #VIPS_OPERATION_MATH_COSH on an image. See vips_math().

vips_countlines

Function which calculates the number of transitions between black and white for the horizontal or the vertical direction of an image. black<128 , white>=128 The function calculates the number of transitions for all Xsize or Ysize and returns the mean of the result Input should be one band, 8-bit.

vips_crop

A synonym for vips_extract_area().

vips_cross_phase

Perform #VIPS_OPERATION_COMPLEX2_CROSS_PHASE on an image. See vips_complex2().

vips_csvsave

Optional arguments:

vips_csvsave_target

Optional arguments:

vips_dE00

Calculate dE 00.

vips_dE76

Calculate dE 76.

vips_dECMC

Calculate dE CMC. The input images are transformed to CMC colour space and the euclidean distance between corresponding pixels calculated.

vips_image_decode

A convenience function to unpack to a format that we can compute with. out.coding is always #VIPS_CODING_NONE.

vips_image_decode_predict

We often need to know what an image will decode to without actually decoding it, for example, in arg checking.

vips_deviate

This operation finds the standard deviation of all pixels in in. It operates on all bands of the input image: use vips_stats() if you need to calculate an average for each band.

vips_divide

This operation calculates in1 / in2 and writes the result to out. If any pixels in in2 are zero, the corresponding pixel in out is also zero.

vips_draw_circle

Optional arguments:

vips_draw_circle1

Optional arguments:

vips_draw_flood

Optional arguments:

vips_draw_flood1

Optional arguments:

vips_draw_image

Optional arguments:

vips_draw_line

Draws a 1-pixel-wide line on an image.

vips_draw_line1

As vips_draw_line(), but just take a single double for ink.

vips_draw_mask

Draw mask on the image. mask is a monochrome 8-bit image with 0/255 for transparent or ink coloured points. Intermediate values blend the ink with the pixel. Use with vips_text() to draw text on an image. Use in a vips_draw_line() subclass to draw an object along a line.

vips_draw_mask1

As vips_draw_mask(), but just takes a single double for ink.

vips_draw_point

As vips_draw_rect(), but draw a single pixel at x, y.

vips_draw_point1

As vips_draw_point(), but just take a single double for ink.

vips_draw_rect

Optional arguments:

vips_draw_rect1

Optional arguments:

vips_draw_smudge

Smudge a section of image. Each pixel in the area left, top, width, height is replaced by the average of the surrounding 3x3 pixels.

vips_dzsave

Optional arguments:

vips_dzsave_buffer

Optional arguments:

vips_dzsave_target

Optional arguments:

vips_embed

Optional arguments:

vips_image_encode

A convenience function to pack to a coding. The inverse of vips_image_decode().

vips_eorimage

Perform #VIPS_OPERATION_BOOLEAN_EOR on a pair of images. See vips_boolean().

vips_eorimage_const

Perform #VIPS_OPERATION_BOOLEAN_EOR on an image and an array of constants. See vips_boolean_const().

vips_eorimage_const1

Perform #VIPS_OPERATION_BOOLEAN_EOR on an image and a constant. See vips_boolean_const1().

vips_equal

Perform #VIPS_OPERATION_RELATIONAL_EQUAL on a pair of images. See vips_relational().

vips_equal_const

Perform #VIPS_OPERATION_RELATIONAL_EQUAL on an image and a constant. See vips_relational_const().

vips_equal_const1

Perform #VIPS_OPERATION_RELATIONAL_EQUAL on an image and a constant. See vips_relational_const().

vips_exp

Perform #VIPS_OPERATION_MATH_EXP on an image. See vips_math().

vips_exp10

Perform #VIPS_OPERATION_MATH_EXP10 on an image. See vips_math().

vips_extract_area

Extract an area from an image. The area must fit within in.

vips_extract_band

Optional arguments:

vips_falsecolour

Force in to 1 band, 8-bit, then transform to a 3-band 8-bit image with a false colour map. The map is supposed to make small differences in brightness more obvious.

vips_fastcor

Calculate a fast correlation surface.

vips_fill_nearest

Optional arguments:

vips_find_trim

Optional arguments:

vips_fitssave

Write a VIPS image to a file in FITS format.

vips_flatten

Optional arguments:

vips_flip

Flips an image left-right or up-down.

vips_float2rad

Convert a three-band float image to Radiance 32-bit packed format.

vips_floor

Round to an integral value with #VIPS_OPERATION_ROUND_FLOOR. See vips_round().

vips_foreign_load_invalidate

Loaders can call this on the image they are making if they see a read error from the load library. It signals “invalidate” on the load operation and will cause it to be dropped from cache.

vips_image_free_buffer

Free the externally allocated buffer found in the input image. This function is intended to be used with g_signal_connect.

vips_freqmult

Multiply in by mask in Fourier space.

vips_fwfft

Transform an image to Fourier space.

vips_gamma

Optional arguments:

vips_gaussblur

Optional arguments:

vips_image_get

Fill value_copy with a copy of the header field. value_copy must be zeroed but uninitialised.

vips_image_get_area

Gets data from image under the name name. A convenience function over vips_image_get(). Use vips_image_get_typeof() to test for the existence of a piece of metadata.

vips_image_get_array_double

Gets out from im under the name name. The field must be of type

VIPS_TYPE_ARRAY_INT.

vips_image_get_array_int

Gets out from im under the name name. The field must be of type

VIPS_TYPE_ARRAY_INT.

vips_image_get_as_string

Returns name from image in out. This function will read any field, returning it as a printable string. You need to free the string with g_free() when you are done with it.

vips_image_get_bands
No description available.
vips_image_get_blob

Gets blob from image under the name name, optionally returns its length in length. A convenience function over vips_image_get(). Use vips_image_get_typeof() to test for the existence of a piece of metadata.

vips_image_get_coding
No description available.
vips_image_get_data

Return a pointer to the image’s pixel data, if possible. This can involve allocating large amounts of memory and performing a long computation. Image pixels are laid out in band-packed rows.

vips_image_get_double

Gets out from im under the name name. The value will be transformed into a double, if possible.

vips_image_get_fields

Get a NULL-terminated array listing all the metadata field names on image. Free the return result with g_strfreev().

vips_image_get_filename
No description available.
vips_image_get_format
No description available.
vips_image_get_height
No description available.
vips_image_get_history

This function reads the image history as a C string. The string is owned by VIPS and must not be freed.

vips_image_get_image

Gets out from im under the name name. The field must be of type

VIPS_TYPE_IMAGE. You must unref out with g_object_unref().

vips_image_get_int

Gets out from im under the name name. The value will be transformed into an int, if possible.

vips_image_get_interpretation

Return the VipsInterpretation set in the image header. Use vips_image_guess_interpretation() if you want a sanity-checked value.

vips_image_get_mode

Image modes are things like "t", meaning a memory buffer, and "p" meaning a delayed computation.

vips_image_get_n_pages

Fetch and sanity-check #VIPS_META_N_PAGES. Default to 1 if not present or crazy.

vips_image_get_n_subifds

Fetch and sanity-check #VIPS_META_N_SUBIFDS. Default to 0 if not present or crazy.

vips_image_get_offset

Matrix images can have an optional offset field for use by integer convolution.

vips_image_get_orientation

Fetch and sanity-check #VIPS_META_ORIENTATION. Default to 1 (no rotate, no flip) if not present or crazy.

vips_image_get_orientation_swap

Return TRUE if applying the orientation would swap width and height.

vips_image_get_page_height

Multi-page images can have a page height. Fetch it, and sanity check it. If page-height is not set, it defaults to the image height.

vips_image_get_scale

Matrix images can have an optional scale field for use by integer convolution.

vips_image_get_string

Gets out from im under the name name. The field must be of type G_TYPE_STRING, VIPS_TYPE_REF_STRING.

vips_image_get_typeof

Read the %GType for a header field. Returns zero if there is no field of that name.

vips_image_get_width
No description available.
vips_image_get_xoffset
No description available.
vips_image_get_xres
No description available.
vips_image_get_yoffset
No description available.
vips_image_get_yres
No description available.
vips_getpoint

Reads a single pixel on an image.

vips_gifsave

Optional arguments:

vips_gifsave_buffer

Optional arguments:

vips_gifsave_target

Optional arguments:

vips_globalbalance

Optional arguments:

vips_gravity

Optional arguments:

vips_grid

Chop a tall thin image up into a set of tiles, lay the tiles out in a grid.

vips_image_guess_format

Return the VipsBandFormat for an image, guessing a sane value if the set value looks crazy.

vips_image_guess_interpretation

Return the VipsInterpretation for an image, guessing a sane value if the set value looks crazy.

vips_image_hasalpha

Look at an image’s interpretation and see if it has extra alpha bands. For example, a 4-band #VIPS_INTERPRETATION_sRGB would, but a six-band

VIPS_INTERPRETATION_MULTIBAND would not.

vips_heifsave

Optional arguments:

vips_heifsave_buffer

Optional arguments:

vips_heifsave_target

Optional arguments:

vips_hist_cum

Form cumulative histogram.

vips_hist_entropy

Estimate image entropy from a histogram. Entropy is calculated as:

vips_hist_equal

Optional arguments:

vips_hist_find

Optional arguments:

vips_hist_find_indexed

Optional arguments:

vips_hist_find_ndim

Optional arguments:

vips_hist_ismonotonic

Test in for monotonicity. out is set non-zero if in is monotonic.

vips_hist_local

Optional arguments:

vips_hist_match

Adjust in to match ref. If in and ref are normalised cumulative histograms, out will be a LUT that adjusts the PDF of the image from which in was made to match the PDF of refs image.

vips_hist_norm

Normalise histogram. The maximum of each band becomes equal to the maximum index, so for example the max for a uchar image becomes 255. Normalise each band separately.

vips_hist_plot

Plot a 1 by any or any by 1 image file as a max by any or any by max image using these rules:

vips_image_history_args

Formats the name/argv as a single string and calls vips_image_history_printf(). A convenience function for command-line prorams.

vips_image_history_printf

Add a line to the image history. The format and arguments are expanded, the date and time is appended prefixed with a hash character, and the whole string is appended to the image history and terminated with a newline.

vips_hough_circle

Optional arguments:

vips_hough_line

Optional arguments:

vips_icc_ac2rc

Transform an image from absolute to relative colorimetry using the MediaWhitePoint stored in the ICC profile.

vips_icc_export

Optional arguments:

vips_icc_import

Optional arguments:

vips_icc_transform

Optional arguments:

vips_ifthenelse

Optional arguments:

vips_imag

Perform #VIPS_OPERATION_COMPLEXGET_IMAG on an image. See vips_complexget().

vips_image_init_fields

A convenience function to set the header fields after creating an image. Normally you copy the fields from your input images with vips_image_pipelinev() and then make any adjustments you need, but if you are creating an image from scratch, for example vips_black() or vips_jpegload(), you do need to set all the fields yourself.

vips_image_inplace

Gets image ready for an in-place operation, such as vips_draw_circle(). After calling this function you can both read and write the image with VIPS_IMAGE_ADDR().

vips_insert

Optional arguments:

vips_image_invalidate_all

Invalidate all pixel caches on image and any downstream images, that is, images which depend on this image. Additionally, all operations which depend upon this image are dropped from the VIPS operation cache.

vips_invert

For unsigned formats, this operation calculates (max - in), eg. (255 - in) for uchar. For signed and float formats, this operation calculates (-1 in).

vips_invfft

Optional arguments:

vips_image_isMSBfirst

Return TRUE if image is in most-significant- byte first form. This is the byte order used on the SPARC architecture and others.

vips_image_is_sequential

TRUE if any of the images upstream from image were opened in sequential mode. Some operations change behaviour slightly in sequential mode to optimize memory behaviour.

vips_image_isfile

Return TRUE if image represents a file on disc in some way.

vips_image_iskilled

If image has been killed (see vips_image_set_kill()), set an error message, clear the VipsImage.kill flag and return TRUE. Otherwise return FALSE.

vips_image_ispartial

Return TRUE if im represents a partial image (a delayed calculation).

vips_join

Optional arguments:

vips_jp2ksave

Optional arguments:

vips_jp2ksave_buffer

Optional arguments:

vips_jp2ksave_target

Optional arguments:

vips_jpegsave

Optional arguments:

vips_jpegsave_buffer

Optional arguments:

vips_jpegsave_mime

Optional arguments:

vips_jpegsave_target

Optional arguments:

vips_jxlsave

Optional arguments:

vips_jxlsave_buffer

Optional arguments:

vips_jxlsave_target

Optional arguments:

vips_labelregions

Optional arguments:

vips_less

Perform #VIPS_OPERATION_RELATIONAL_LESS on a pair of images. See vips_relational().

vips_less_const

Perform #VIPS_OPERATION_RELATIONAL_LESS on an image and a constant. See vips_relational_const().

vips_less_const1

Perform #VIPS_OPERATION_RELATIONAL_LESS on an image and a constant. See vips_relational_const().

vips_lesseq

Perform #VIPS_OPERATION_RELATIONAL_LESSEQ on a pair of images. See vips_relational().

vips_lesseq_const

Perform #VIPS_OPERATION_RELATIONAL_LESSEQ on an image and a constant. See vips_relational_const().

vips_lesseq_const1

Perform #VIPS_OPERATION_RELATIONAL_LESSEQ on an image and a constant. See vips_relational_const().

vips_linear

Optional arguments:

vips_linear1

Optional arguments:

vips_linecache

Optional arguments:

vips_log

Perform #VIPS_OPERATION_MATH_LOG on an image. See vips_math().

vips_log10

Perform #VIPS_OPERATION_MATH_LOG10 on an image. See vips_math().

vips_lshift

Perform #VIPS_OPERATION_BOOLEAN_LSHIFT on a pair of images. See vips_boolean().

vips_lshift_const

Perform #VIPS_OPERATION_BOOLEAN_LSHIFT on an image and an array of constants. See vips_boolean_const().

vips_lshift_const1

Perform #VIPS_OPERATION_BOOLEAN_LSHIFT on an image and a constant. See vips_boolean_const1().

vips_magicksave

Optional arguments:

vips_magicksave_buffer

Optional arguments:

vips_image_map

This function calls fn for every header field, including every item of metadata.

vips_mapim

Optional arguments:

vips_maplut

Optional arguments:

vips_match

Optional arguments:

vips_math

Perform various functions in -lm, the maths library, on images.

vips_math2

This operation calculates a 2-ary maths operation on a pair of images and writes the result to out. The images may have any non-complex format. out is float except in the case that either of left or right are double, in which case out is also double.

vips_math2_const

This operation calculates various 2-ary maths operations on an image and an array of constants and writes the result to out. The image may have any non-complex format. out is float except in the case that in is double, in which case out is also double.

vips_math2_const1

This operation calculates various 2-ary maths operations on an image and a constant. See vips_math2_const().

vips_matrixinvert

This operation calculates the inverse of the matrix represented in m. The scale and offset members of the input matrix are ignored.

vips_matrixprint

Print in to %stdout in matrix format. See vips_matrixload() for a description of the format.

vips_matrixsave

Write in to filename in matrix format. See vips_matrixload() for a description of the format.

vips_matrixsave_target

As vips_matrixsave(), but save to a target.

vips_max

Optional arguments:

vips_measure

Optional arguments:

vips_median

A convenience function equivalent to:

vips_merge

Optional arguments:

vips_min

Optional arguments:

vips_image_minimise_all

Minimise memory use on this image and any upstream images, that is, images which this image depends upon. This function is called automatically at the end of a computation, but it might be useful to call at other times.

vips_more

Perform #VIPS_OPERATION_RELATIONAL_MORE on a pair of images. See vips_relational().

vips_more_const

Perform #VIPS_OPERATION_RELATIONAL_MORE on an image and a constant. See vips_relational_const().

vips_more_const1

Perform #VIPS_OPERATION_RELATIONAL_MORE on an image and a constant. See vips_relational_const().

vips_moreeq

Perform #VIPS_OPERATION_RELATIONAL_MOREEQ on a pair of images. See vips_relational().

vips_moreeq_const

Perform #VIPS_OPERATION_RELATIONAL_MOREEQ on an image and a constant. See vips_relational_const().

vips_moreeq_const1

Perform #VIPS_OPERATION_RELATIONAL_MOREEQ on an image and a constant. See vips_relational_const().

vips_morph

Performs a morphological operation on in using mask as a structuring element.

vips_mosaic

Optional arguments:

vips_mosaic1

Optional arguments:

vips_msb

Optional arguments:

vips_multiply

This operation calculates left * right and writes the result to out.

vips_niftisave

Write a VIPS image to a file in NIFTI format.

vips_notequal

Perform #VIPS_OPERATION_RELATIONAL_NOTEQ on a pair of images. See vips_relational().

vips_notequal_const

Perform #VIPS_OPERATION_RELATIONAL_NOTEQ on an image and a constant. See vips_relational_const().

vips_notequal_const1

Perform #VIPS_OPERATION_RELATIONAL_NOTEQ on an image and a constant. See vips_relational_const().

vips_orimage

Perform #VIPS_OPERATION_BOOLEAN_OR on a pair of images. See vips_boolean().

vips_orimage_const

Perform #VIPS_OPERATION_BOOLEAN_OR on an image and an array of constants. See vips_boolean_const().

vips_orimage_const1

Perform #VIPS_OPERATION_BOOLEAN_OR on an image and a constant. See vips_boolean_const1().

vips_percent

Vips_percent() returns (through the threshold parameter) the threshold below which there are percent values of in. For example:

vips_phasecor

Convert the two input images to Fourier space, calculate phase-correlation, back to real space.

vips_image_pio_input

Check that an image is readable with vips_region_prepare() and friends. If it isn’t, try to transform the image so that vips_region_prepare() can work.

vips_image_pio_output

Check that an image is writeable with vips_image_generate(). If it isn’t, try to transform the image so that vips_image_generate() can work.

vips_pngsave

Optional arguments:

vips_pngsave_buffer

Optional arguments:

vips_pngsave_target

Optional arguments:

vips_polar

Perform #VIPS_OPERATION_COMPLEX_POLAR on an image. See vips_complex().

vips_pow

Perform #VIPS_OPERATION_MATH2_POW on a pair of images. See vips_math2().

vips_pow_const

Perform #VIPS_OPERATION_MATH2_POW on an image and a constant. See vips_math2_const().

vips_pow_const1

Perform #VIPS_OPERATION_MATH2_POW on an image and a constant. See vips_math2_const().

vips_ppmsave

Optional arguments:

vips_ppmsave_target

Optional arguments:

vips_premultiply

Optional arguments:

vips_image_print_field

Prints field name to stdout as ASCII. Handy for debugging.

vips_profile

Vips_profile() searches inward from the edge of in and finds the first non-zero pixel. Pixels in columns have the distance from the top edge to the first non-zero pixel in that column, rows has the distance from the left edge to the first non-zero pixel in that row.

vips_project

Find the horizontal and vertical projections of an image, ie. the sum of every row of pixels, and the sum of every column of pixels. The output format is uint, int or double, depending on the input format.

vips_quadratic

Optional arguments:

vips_rad2float

Unpack a RAD (#VIPS_CODING_RAD) image to a three-band float image.

vips_radsave

Write a VIPS image in Radiance (HDR) format.

vips_radsave_buffer

As vips_radsave(), but save to a memory buffer.

vips_radsave_target

As vips_radsave(), but save to a target.

vips_rank

Vips_rank() does rank filtering on an image. A window of size width by height is passed over the image. At each position, the pixels inside the window are sorted into ascending order and the pixel at position index is output. index numbers from 0.

vips_rawsave

Writes the pixels in in to the file filename with no header or other metadata.

vips_rawsave_fd

Writes the pixels in in to the fd with no header or other metadata. Handy for implementing other savers.

vips_real

Perform #VIPS_OPERATION_COMPLEXGET_REAL on an image. See vips_complexget().

vips_recomb

This operation recombines an image’s bands. Each pixel in in is treated as an n-element vector, where n is the number of bands in in, and multipled by the n x m matrix m to produce the m-band image out.

vips_rect

Perform #VIPS_OPERATION_COMPLEX_RECT on an image. See vips_complex().

vips_reduce

Optional arguments:

vips_reduceh

Optional arguments:

vips_reducev

Optional arguments:

vips_relational

Perform various relational operations on pairs of images.

vips_relational_const

Perform various relational operations on an image and an array of constants.

vips_relational_const1

Perform various relational operations on an image and a constant. See vips_relational_const().

vips_remainder

This operation calculates left % right (remainder after integer division) and writes the result to out. The images may have any non-complex format. For float formats, vips_remainder() calculates in1 - in2 * floor (in1 / in2).

vips_remainder_const

This operation calculates in % c (remainder after division by an array of constants) and writes the result to out. The image may have any non-complex format. For float formats, vips_remainder_const() calculates in - c * floor (in / c).

vips_remainder_const1

This operation calculates in % c (remainder after division by a constant) and writes the result to out. The image may have any non-complex format. For float formats, vips_remainder_const() calculates in - c * floor (in / c).

vips_remosaic

Vips_remosaic() works rather as vips_globalbalance(). It takes apart the mosaiced image in and rebuilds it, substituting images.

vips_image_remove

Find and remove an item of metadata. Return FALSE if no metadata of that name was found.

vips_reorder_margin_hint

Vips_reorder_margin_hint() sets a hint that image contains a margin, that is, that each vips_region_prepare() on image will request a slightly larger region from it’s inputs. A good value for margin is (width * height) for the window the operation uses.

vips_reorder_prepare_many

Vips_reorder_prepare_many() runs vips_region_prepare() on each region in regions, requesting the pixels in r.

vips_replicate

Repeats an image many times.

vips_resize

Optional arguments:

vips_rint

Round to an integral value with #VIPS_OPERATION_ROUND_RINT. See vips_round().

vips_rot

Rotate in by a multiple of 90 degrees.

vips_rot180

Rotate in by 180 degress. A convenience function over vips_rot().

vips_rot270

Rotate in by 270 degress clockwise. A convenience function over vips_rot().

vips_rot45

Optional arguments:

vips_rotate

Optional arguments:

vips_round

Round to an integral value.

vips_rshift

Perform #VIPS_OPERATION_BOOLEAN_RSHIFT on a pair of images. See vips_boolean().

vips_rshift_const

Perform #VIPS_OPERATION_BOOLEAN_LSHIFT on an image and an array of constants. See vips_boolean_const().

vips_rshift_const1

Perform #VIPS_OPERATION_BOOLEAN_RSHIFT on an image and a constant. See vips_boolean_const1().

vips_sRGB2HSV

Convert to HSV.

vips_sRGB2scRGB

Convert an sRGB image to scRGB. The input image can be 8 or 16-bit.

vips_scRGB2BW

Optional arguments:

vips_scRGB2XYZ

Turn XYZ to scRGB.

vips_scRGB2sRGB

Optional arguments:

vips_scale

Optional arguments:

vips_sequential

Optional arguments:

vips_image_set

Set a piece of metadata on image. Any old metadata with that name is destroyed. The %GValue is copied into the image, so you need to unset the value when you’re done with it.

vips_image_set_area

Attaches data as a metadata item on image under the name name. When VIPS no longer needs the metadata, it will be freed with free_fn.

vips_image_set_array_double

Attaches array as a metadata item on image as name. A convenience function over vips_image_set().

vips_image_set_array_int

Attaches array as a metadata item on image as name. A convenience function over vips_image_set().

vips_image_set_blob

Attaches blob as a metadata item on image under the name name. A convenience function over vips_image_set() using a vips_blob.

vips_image_set_blob_copy

Attaches blob as a metadata item on image under the name name, taking a copy of the memory area. A convenience function over vips_image_set_blob().

vips_image_set_delete_on_close

Sets the delete_on_close flag for the image. If this flag is set, when image is finalized, the filename held in image->filename at the time of this call is deleted.

vips_image_set_double

Attaches d as a metadata item on image as name. A convenience function over vips_image_set().

vips_image_set_image

Attaches im as a metadata item on image as name. A convenience function over vips_image_set().

vips_image_set_int

Attaches i as a metadata item on image under the name name. A convenience function over vips_image_set().

vips_image_set_kill

Set the VipsImage.kill flag on an image. Handy for stopping sets of threads.

vips_image_set_progress

Vips signals evaluation progress via the VipsImage::preeval, VipsImage::eval and VipsImage::posteval signals. Progress is signalled on the most-downstream image for which vips_image_set_progress() was called.

vips_image_set_string

Attaches str as a metadata item on image as name. A convenience function over vips_image_set() using #VIPS_TYPE_REF_STRING.

vips_sharpen

Optional arguments:

vips_shrink

Optional arguments:

vips_shrinkh

Optional arguments:

vips_shrinkv

Optional arguments:

vips_sign

Finds the unit vector in the direction of the pixel value. For non-complex images, it returns a signed char image with values -1, 0, and 1 for negative, zero and positive pixels. For complex images, it returns a complex normalised to length 1.

vips_similarity

Optional arguments:

vips_sin

Perform #VIPS_OPERATION_MATH_SIN on an image. See vips_math().

vips_sinh

Perform #VIPS_OPERATION_MATH_SINH on an image. See vips_math().

vips_smartcrop

Optional arguments:

vips_sobel

Simple Sobel edge detector.

vips_spcor

Calculate a correlation surface.

vips_spectrum

Make a displayable (ie. 8-bit unsigned int) power spectrum.

vips_stats

Find many image statistics in a single pass through the data. out is a one-band #VIPS_FORMAT_DOUBLE image of at least 10 columns by n + 1 (where n is number of bands in image in) rows. Columns are statistics, and are, in order: minimum, maximum, sum, sum of squares, mean, standard deviation, x coordinate of minimum, y coordinate of minimum, x coordinate of maximum, y coordinate of maximum. Later versions of vips_stats() may add more columns.

vips_stdif

Optional arguments:

vips_subsample

Optional arguments:

vips_subtract

This operation calculates in1 - in2 and writes the result to out.

vips_tan

Perform #VIPS_OPERATION_MATH_TAN on an image. See vips_math().

vips_tanh

Perform #VIPS_OPERATION_MATH_TANH on an image. See vips_math().

vips_thumbnail_image

Optional arguments:

vips_tiffsave

Optional arguments:

vips_tiffsave_buffer

Optional arguments:

vips_tiffsave_target

Optional arguments:

vips_tilecache

Optional arguments:

vips_transpose3d

Optional arguments:

vips_unpremultiply

Optional arguments:

vips_vipssave

Write in to filename in VIPS format.

vips_vipssave_target

As vips_vipssave(), but save to a target.

vips_webpsave

Optional arguments:

vips_webpsave_buffer

Optional arguments:

vips_webpsave_mime

Optional arguments:

vips_webpsave_target

Optional arguments:

vips_image_wio_input

Check that an image is readable via the VIPS_IMAGE_ADDR() macro, that is, that the entire image is in memory and all pixels can be read with VIPS_IMAGE_ADDR(). If it isn’t, try to transform it so that VIPS_IMAGE_ADDR() can work.

vips_wop

Perform #VIPS_OPERATION_MATH2_WOP on a pair of images. See vips_math2().

vips_wop_const

Perform #VIPS_OPERATION_MATH2_WOP on an image and a constant. See vips_math2_const().

vips_wop_const1

Perform #VIPS_OPERATION_MATH2_WOP on an image and a constant. See vips_math2_const().

vips_wrap

Optional arguments:

vips_image_write

Write image to out. Use vips_image_new() and friends to create the VipsImage you want to write to.

vips_image_write_line

Write a line of pixels to an image. This function must be called repeatedly with ypos increasing from 0 to VipsImage::height . linebuffer must be VIPS_IMAGE_SIZEOF_LINE() bytes long.

vips_image_write_prepare

Call this after setting header fields (width, height, and so on) to allocate resources ready for writing.

vips_image_write_to_buffer

Writes in to a memory buffer in a format specified by suffix.

vips_image_write_to_file

Writes in to name using the saver recommended by vips_foreign_find_save().

vips_image_write_to_memory

Writes in to memory as a simple, unformatted C-style array.

vips_image_write_to_target

Writes in to output in format suffix.

vips_zoom

Zoom an image by repeating pixels. This is fast nearest-neighbour zoom.

Methods inherited from VipsObject (27)

Please see VipsObject for a full list of methods.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

Vips.Image:bands
No description available.
Vips.Image:coding
No description available.
Vips.Image:demand
No description available.
Vips.Image:filename
No description available.
Vips.Image:foreign-buffer
No description available.
Vips.Image:format
No description available.
Vips.Image:height
No description available.
Vips.Image:interpretation
No description available.
Vips.Image:kill
No description available.
Vips.Image:mode
No description available.
Vips.Image:sizeof-header
No description available.
Vips.Image:width
No description available.
Vips.Image:xoffset
No description available.
Vips.Image:xres
No description available.
Vips.Image:yoffset
No description available.
Vips.Image:yres
No description available.
Properties inherited from VipsObject (2)
Vips.Object:description
No description available.
Vips.Object:nickname
No description available.

Signals

Vips.Image::eval

The ::eval signal is emitted once per work unit (typically a 128 x 128 area of pixels) during image computation.

Vips.Image::invalidate

The ::invalidate signal is emitted when an image or one of it’s upstream data sources has been destructively modified. See vips_image_invalidate_all().

Vips.Image::minimise

The ::minimise signal is emitted when an image has been asked to minimise memory usage. All non-essential caches are dropped. See vips_image_minimise_all().

Vips.Image::posteval

The ::posteval signal is emitted once at the end of the computation of image. It’s a good place to shut down evaluation feedback.

Vips.Image::preeval

The ::preeval signal is emitted once before computation of image starts. It’s a good place to set up evaluation feedback.

Vips.Image::written

The ::written signal is emitted just after an image has been written to. It is used by vips to implement things like write to foreign file formats.

Signals inherited from VipsObject (4)
Vips.Object::close

The ::close signal is emitted once during object close. The object is dying and may not work.

Vips.Object::postbuild

The ::postbuild signal is emitted once just after successful object construction. Return non-zero to cause object construction to fail.

Vips.Object::postclose

The ::postclose signal is emitted once after object close. The object pointer is still valid, but nothing else.

Vips.Object::preclose

The ::preclose signal is emitted once just before object close starts. The oject is still alive.

Signals inherited from GObject (1)
GObject.Object::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct VipsImageClass {
  VipsObjectClass parent_class;
  void (* preeval) (
    VipsImage* image,
    VipsProgress* progress,
    void* data
  );
  void (* eval) (
    VipsImage* image,
    VipsProgress* progress,
    void* data
  );
  void (* posteval) (
    VipsImage* image,
    VipsProgress* progress,
    void* data
  );
  void (* written) (
    VipsImage* image,
    int* result,
    void* data
  );
  void (* invalidate) (
    VipsImage* image,
    void* data
  );
  void (* minimise) (
    VipsImage* image,
    void* data
  );
  
}
Class members
parent_class
VipsObjectClass
  No description available.
preeval
void (* preeval) (
    VipsImage* image,
    VipsProgress* progress,
    void* data
  )
  No description available.
eval
void (* eval) (
    VipsImage* image,
    VipsProgress* progress,
    void* data
  )
  No description available.
posteval
void (* posteval) (
    VipsImage* image,
    VipsProgress* progress,
    void* data
  )
  No description available.
written
void (* written) (
    VipsImage* image,
    int* result,
    void* data
  )
  No description available.
invalidate
void (* invalidate) (
    VipsImage* image,
    void* data
  )
  No description available.
minimise
void (* minimise) (
    VipsImage* image,
    void* data
  )
  No description available.

Virtual methods

Vips.ImageClass.eval
No description available.
Vips.ImageClass.invalidate
No description available.
Vips.ImageClass.minimise
No description available.
Vips.ImageClass.posteval
No description available.
Vips.ImageClass.preeval
No description available.
Vips.ImageClass.written
No description available.