View Source Vix.Vips.Operation (vix v0.33.0)

Provides access to VIPS operations for image processing.

This module exposes VIPS operations as Elixir functions, allowing you to perform various image processing tasks like resizing, color manipulation, filtering, and format conversion.

Quick Start

Here's a simple example to resize an image:

# Load and resize an image to 500px width, maintaining aspect ratio
{:ok, image} = Operation.thumbnail("input.jpg", 500)

Working with Operations

Operations in Vix can be grouped into several categories:

Most operations follow a consistent pattern:

  1. Load your image
  2. Apply one or more operations
  3. Save the result

Common Examples

# Basic image resizing while preserving aspect ratio
{:ok, image} = Vix.Vips.Image.new_from_file("input.jpg")
# scale down by 50%
{:ok, resized} = Operation.resize(image, scale: 0.5)
:ok = Vix.Vips.Image.write_to_file(resized, "output.jpg")

# Convert to grayscale and apply Gaussian blur
{:ok, image} = Vix.Vips.Image.new_from_file("input.jpg")
{:ok, gray} = Operation.colourspace(image, :VIPS_INTERPRETATION_B_W)
{:ok, blurred} = Operation.gaussblur(gray, 3.0)

Advanced Usage

Smart Cropping for Thumbnails

# Generate a smart-cropped thumbnail focusing on interesting areas
{:ok, thumb} = Operation.thumbnail("input.jpg", 300,
  crop: :attention,  # Uses image analysis to find interesting areas
  height: 300,      # Force square thumbnail
)

Complex Image Composition

# Create a watermarked image with transparency
{:ok, base} = Vix.Vips.Image.new_from_file("photo.jpg")
{:ok, watermark} = Vix.Vips.Image.new_from_file("watermark.png")
{:ok, composed} = Operation.composite2(base, watermark,
  :VIPS_BLEND_MODE_OVER,  # Blend mode
  x: 20,         # Offset from left
  y: 20,         # Offset from top
  opacity: 0.8   # Watermark transparency
)

Color Management

# Convert between color spaces with ICC profiles
{:ok, image} = Vix.Vips.Image.new_from_file("input.jpg")
{:ok, converted} = Operation.icc_transform(image,
  "sRGB.icc",     # Target color profile
  "input-profile": "Adobe-RGB.icc"
)

Performance Tips

  • Use thumbnail/2 instead of resize/2 when possible - it's optimized for common cases
  • Chain operations to avoid intermediate file I/O
  • For batch processing, reuse loaded ICC profiles and watermarks
  • Consider using sequential mode for large images

Additional Resources

Summary

Functions

Absolute value of an image

Absolute value of an image

Add two images

Add two images

Affine transform of an image

Affine transform of an image

Join an array of images

Join an array of images

Autorotate image by exif tag

Autorotate image by exif tag

Find image average

Find image average

Boolean operation across image bands

Boolean operation across image bands

Fold up x axis into bands

Fold up x axis into bands

Bandwise join a set of images

Bandwise join a set of images

Append a constant band to an image

Append a constant band to an image

Band-wise average

Band-wise average

Band-wise rank of a set of images

Band-wise rank of a set of images

Unfold image bands into x axis

Unfold image bands into x axis

Boolean operation on two images

Boolean operation on two images

Boolean operations against a constant

Boolean operations against a constant

Build a look-up table

Build a look-up table

Byteswap an image

Byteswap an image

Canny edge detector

Canny edge detector

Use pixel values to pick cases from an array of images

Use pixel values to pick cases from an array of images

Transform lch to cmc

Transform lch to cmc

Transform cmyk to xyz

Transform cmyk to xyz

Convert to a new colorspace

Convert to a new colorspace

Convolve with rotating mask

Convolve with rotating mask

Complex binary operations on two images

Complex binary operations on two images

Perform a complex operation on an image

Perform a complex operation on an image

Form a complex image from two real images

Form a complex image from two real images

Get a component from a complex image

Get a component from a complex image

Blend a pair of images with a blend mode

Blend a pair of images with a blend mode

Blend an array of images with an array of blend modes

Blend an array of images with an array of blend modes

Convolution operation

Convolution operation

Approximate integer convolution

Approximate integer convolution

Approximate separable integer convolution

Approximate separable integer convolution

Float convolution operation

Float convolution operation

Int convolution operation

Int convolution operation

Separable convolution operation

Separable convolution operation

Count lines in an image

Count lines in an image

Calculate de00

Calculate de00

Calculate de76

Calculate de76

Calculate decmc

Calculate decmc

Find image standard deviation

Find image standard deviation

Divide two images

Divide two images

Save image to deepzoom file

Save image to deepzoom file

Save image to dz buffer

Save image to dz buffer

Embed an image in a larger image

Embed an image in a larger image

Extract an area from an image

Extract an area from an image

Extract band from an image

Extract band from an image

Make an image showing the eye's spatial response

Make an image showing the eye's spatial response

False-color an image

False-color an image

Fast correlation

Fast correlation

Fill image zeros with nearest non-zero pixel

Fill image zeros with nearest non-zero pixel

Search an image for non-edge areas

Search an image for non-edge areas

Flatten alpha out of an image

Flatten alpha out of an image

Flip an image

Flip an image

Transform float rgb to radiance coding

Transform float rgb to radiance coding

Frequency-domain filtering

Frequency-domain filtering

Read a point from an image

Read a point from an image

Load gif with libnsgif

Load gif with libnsgif

Global balance an image mosaic

Global balance an image mosaic

Place an image within a larger image with a certain gravity

Place an image within a larger image with a certain gravity

Make a grey ramp image

Make a grey ramp image

Save image in heif format

Save image in heif format

Save image in heif format

Save image in heif format

Form cumulative histogram

Form cumulative histogram

Estimate image entropy

Estimate image entropy

Histogram equalisation

Histogram equalisation

Find image histogram

Find image histogram

Find n-dimensional image histogram

Find n-dimensional image histogram

Test for monotonicity

Test for monotonicity

Match two histograms

Match two histograms

Normalise histogram

Normalise histogram

Plot histogram

Plot histogram

Find hough circle transform

Find hough circle transform

Find hough line transform

Find hough line transform

Transform hsv to srgb

Transform hsv to srgb

Output to device with icc profile

Output to device with icc profile

Import from device with icc profile

Import from device with icc profile

Transform between devices with icc profiles

Transform between devices with icc profiles

Make a 1d image where pixel values are indexes

Make a 1d image where pixel values are indexes

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

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

Invert an image

Invert an image

Build an inverted look-up table

Build an inverted look-up table

Save image to jpeg buffer

Save image to jpeg buffer

Save image to jpeg mime

Save image to jpeg mime

Transform float lab to labq coding

Transform float lab to labq coding

Transform float lab to signed short

Transform float lab to signed short

Transform lab to lch

Transform lab to lch

Transform cielab to xyz

Transform cielab to xyz

Label regions in an image

Label regions in an image

Unpack a labq image to float lab

Unpack a labq image to float lab

Unpack a labq image to short lab

Unpack a labq image to short lab

Convert a labq image to srgb

Convert a labq image to srgb

Transform signed short lab to float

Transform signed short lab to float

Transform short lab to labq coding

Transform short lab to labq coding

Transform lch to cmc

Transform lch to cmc

Transform lch to lab

Transform lch to lab

Calculate (a * in + b)

Calculate (a * in + b)

Cache an image as a set of lines

Cache an image as a set of lines

Make a laplacian of gaussian image

Make a laplacian of gaussian image

Resample with a map image

Resample with a map image

Map an image though a lut

Map an image though a lut

Binary math operations

Binary math operations

Binary math operations with a constant

Binary math operations with a constant

Apply a math operation to an image

Apply a math operation to an image

Invert an matrix

Invert an matrix

Find image maximum

Find image maximum

Measure a set of patches on a color chart

Measure a set of patches on a color chart

Find image minimum

Find image minimum

Morphology operation

Morphology operation

Pick most-significant byte from an image

Pick most-significant byte from an image

Multiply two images

Multiply two images

Find threshold for percent of pixels

Find threshold for percent of pixels

Make a perlin noise image

Make a perlin noise image

Calculate phase correlation

Calculate phase correlation

Save image to file as png

Save image to file as png

Save image to buffer as png

Save image to buffer as png

Premultiply image alpha

Premultiply image alpha

Prewitt edge detector

Prewitt edge detector

Find image profiles

Find image profiles

Load named icc profile

Load named icc profile

Find image projections

Find image projections

Resample an image with a quadratic transform

Resample an image with a quadratic transform

Unpack radiance coding to float rgb

Unpack radiance coding to float rgb

Write raw image to file descriptor

Write raw image to file descriptor

Linear recombination with matrix

Linear recombination with matrix

Shrink an image horizontally

Shrink an image horizontally

Shrink an image vertically

Shrink an image vertically

Relational operation on two images

Relational operation on two images

Relational operations against a constant

Relational operations against a constant

Remainder after integer division of two images

Remainder after integer division of two images

Remainder after integer division of an image and a constant

Remainder after integer division of an image and a constant

Replicate an image

Replicate an image

Rotate an image

Rotate an image

Rotate an image by a number of degrees

Rotate an image by a number of degrees

Perform a round function on an image

Perform a round function on an image

Scale an image to uchar

Scale an image to uchar

Scharr edge detector

Scharr edge detector

Convert scrgb to bw

Convert scrgb to bw

Convert an scrgb image to srgb

Convert an scrgb image to srgb

Transform scrgb to xyz

Transform scrgb to xyz

Check sequential access

Check sequential access

Unsharp masking for print

Unsharp masking for print

Shrink an image horizontally

Shrink an image horizontally

Shrink an image vertically

Shrink an image vertically

Unit vector of pixel

Unit vector of pixel

Similarity transform of an image

Similarity transform of an image

Extract an area from an image

Extract an area from an image

Sobel edge detector

Sobel edge detector

Spatial correlation

Spatial correlation

Make displayable power spectrum

Make displayable power spectrum

Transform srgb to hsv

Transform srgb to hsv

Convert an srgb image to scrgb

Convert an srgb image to scrgb

Find many image stats

Find many image stats

Subtract two images

Subtract two images

Sum an array of images

Sum an array of images

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

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

Run an external command

Run an external command

Make a text image

Make a text image

Generate thumbnail from file

Generate thumbnail from file

Generate thumbnail from buffer

Generate thumbnail from buffer

Generate thumbnail from image

Generate thumbnail from image

Save image to tiff buffer

Save image to tiff buffer

Cache an image as a set of tiles

Cache an image as a set of tiles

Build a look-up table

Build a look-up table

Transpose3d an image

Unpremultiply image alpha

Unpremultiply image alpha

Save image to file in vips format

Save image to file in vips format

Save image to webp mime

Save image to webp mime

Make a worley noise image

Make a worley noise image

Wrap image origin

Wrap image origin

Transform xyz to cmyk

Transform xyz to cmyk

Transform xyz to lab

Transform xyz to lab

Transform xyz to scrgb

Transform xyz to scrgb

Transform xyz to yxy

Transform xyz to yxy

Make an image where pixel values are coordinates

Make an image where pixel values are coordinates

Transform yxy to xyz

Transform yxy to xyz

Zoom an image

Zoom an image

Types

vips_access()

@type vips_access() ::
  :VIPS_ACCESS_RANDOM
  | :VIPS_ACCESS_SEQUENTIAL
  | :VIPS_ACCESS_SEQUENTIAL_UNBUFFERED

vips_align()

@type vips_align() :: :VIPS_ALIGN_LOW | :VIPS_ALIGN_CENTRE | :VIPS_ALIGN_HIGH

vips_angle45()

@type vips_angle45() ::
  :VIPS_ANGLE45_D0
  | :VIPS_ANGLE45_D45
  | :VIPS_ANGLE45_D90
  | :VIPS_ANGLE45_D135
  | :VIPS_ANGLE45_D180
  | :VIPS_ANGLE45_D225
  | :VIPS_ANGLE45_D270
  | :VIPS_ANGLE45_D315

vips_angle()

@type vips_angle() ::
  :VIPS_ANGLE_D0 | :VIPS_ANGLE_D90 | :VIPS_ANGLE_D180 | :VIPS_ANGLE_D270

vips_band_format()

@type vips_band_format() ::
  :VIPS_FORMAT_NOTSET
  | :VIPS_FORMAT_UCHAR
  | :VIPS_FORMAT_CHAR
  | :VIPS_FORMAT_USHORT
  | :VIPS_FORMAT_SHORT
  | :VIPS_FORMAT_UINT
  | :VIPS_FORMAT_INT
  | :VIPS_FORMAT_FLOAT
  | :VIPS_FORMAT_COMPLEX
  | :VIPS_FORMAT_DOUBLE
  | :VIPS_FORMAT_DPCOMPLEX

vips_blend_mode()

@type vips_blend_mode() ::
  :VIPS_BLEND_MODE_CLEAR
  | :VIPS_BLEND_MODE_SOURCE
  | :VIPS_BLEND_MODE_OVER
  | :VIPS_BLEND_MODE_IN
  | :VIPS_BLEND_MODE_OUT
  | :VIPS_BLEND_MODE_ATOP
  | :VIPS_BLEND_MODE_DEST
  | :VIPS_BLEND_MODE_DEST_OVER
  | :VIPS_BLEND_MODE_DEST_IN
  | :VIPS_BLEND_MODE_DEST_OUT
  | :VIPS_BLEND_MODE_DEST_ATOP
  | :VIPS_BLEND_MODE_XOR
  | :VIPS_BLEND_MODE_ADD
  | :VIPS_BLEND_MODE_SATURATE
  | :VIPS_BLEND_MODE_MULTIPLY
  | :VIPS_BLEND_MODE_SCREEN
  | :VIPS_BLEND_MODE_OVERLAY
  | :VIPS_BLEND_MODE_DARKEN
  | :VIPS_BLEND_MODE_LIGHTEN
  | :VIPS_BLEND_MODE_COLOUR_DODGE
  | :VIPS_BLEND_MODE_COLOUR_BURN
  | :VIPS_BLEND_MODE_HARD_LIGHT
  | :VIPS_BLEND_MODE_SOFT_LIGHT
  | :VIPS_BLEND_MODE_DIFFERENCE
  | :VIPS_BLEND_MODE_EXCLUSION

vips_coding()

@type vips_coding() ::
  :VIPS_CODING_ERROR | :VIPS_CODING_NONE | :VIPS_CODING_LABQ | :VIPS_CODING_RAD

vips_combine()

@type vips_combine() :: :VIPS_COMBINE_MAX | :VIPS_COMBINE_SUM | :VIPS_COMBINE_MIN

vips_combine_mode()

@type vips_combine_mode() :: :VIPS_COMBINE_MODE_SET | :VIPS_COMBINE_MODE_ADD

vips_compass_direction()

@type vips_compass_direction() ::
  :VIPS_COMPASS_DIRECTION_CENTRE
  | :VIPS_COMPASS_DIRECTION_NORTH
  | :VIPS_COMPASS_DIRECTION_EAST
  | :VIPS_COMPASS_DIRECTION_SOUTH
  | :VIPS_COMPASS_DIRECTION_WEST
  | :VIPS_COMPASS_DIRECTION_NORTH_EAST
  | :VIPS_COMPASS_DIRECTION_SOUTH_EAST
  | :VIPS_COMPASS_DIRECTION_SOUTH_WEST
  | :VIPS_COMPASS_DIRECTION_NORTH_WEST

vips_demand_style()

@type vips_demand_style() ::
  :VIPS_DEMAND_STYLE_ERROR
  | :VIPS_DEMAND_STYLE_SMALLTILE
  | :VIPS_DEMAND_STYLE_FATSTRIP
  | :VIPS_DEMAND_STYLE_THINSTRIP

vips_direction()

@type vips_direction() :: :VIPS_DIRECTION_HORIZONTAL | :VIPS_DIRECTION_VERTICAL

vips_extend()

@type vips_extend() ::
  :VIPS_EXTEND_BLACK
  | :VIPS_EXTEND_COPY
  | :VIPS_EXTEND_REPEAT
  | :VIPS_EXTEND_MIRROR
  | :VIPS_EXTEND_WHITE
  | :VIPS_EXTEND_BACKGROUND

vips_fail_on()

@type vips_fail_on() ::
  :VIPS_FAIL_ON_NONE
  | :VIPS_FAIL_ON_TRUNCATED
  | :VIPS_FAIL_ON_ERROR
  | :VIPS_FAIL_ON_WARNING

vips_foreign_dz_container()

@type vips_foreign_dz_container() ::
  :VIPS_FOREIGN_DZ_CONTAINER_FS
  | :VIPS_FOREIGN_DZ_CONTAINER_ZIP
  | :VIPS_FOREIGN_DZ_CONTAINER_SZI

vips_foreign_dz_depth()

@type vips_foreign_dz_depth() ::
  :VIPS_FOREIGN_DZ_DEPTH_ONEPIXEL
  | :VIPS_FOREIGN_DZ_DEPTH_ONETILE
  | :VIPS_FOREIGN_DZ_DEPTH_ONE

vips_foreign_dz_layout()

@type vips_foreign_dz_layout() ::
  :VIPS_FOREIGN_DZ_LAYOUT_DZ
  | :VIPS_FOREIGN_DZ_LAYOUT_ZOOMIFY
  | :VIPS_FOREIGN_DZ_LAYOUT_GOOGLE
  | :VIPS_FOREIGN_DZ_LAYOUT_IIIF
  | :VIPS_FOREIGN_DZ_LAYOUT_IIIF3

vips_foreign_flags()

@type vips_foreign_flags() :: [
  :VIPS_FOREIGN_NONE
  | :VIPS_FOREIGN_PARTIAL
  | :VIPS_FOREIGN_BIGENDIAN
  | :VIPS_FOREIGN_SEQUENTIAL
]

vips_foreign_heif_compression()

@type vips_foreign_heif_compression() ::
  :VIPS_FOREIGN_HEIF_COMPRESSION_HEVC
  | :VIPS_FOREIGN_HEIF_COMPRESSION_AVC
  | :VIPS_FOREIGN_HEIF_COMPRESSION_JPEG
  | :VIPS_FOREIGN_HEIF_COMPRESSION_AV1

vips_foreign_heif_encoder()

@type vips_foreign_heif_encoder() ::
  :VIPS_FOREIGN_HEIF_ENCODER_AUTO
  | :VIPS_FOREIGN_HEIF_ENCODER_AOM
  | :VIPS_FOREIGN_HEIF_ENCODER_RAV1E
  | :VIPS_FOREIGN_HEIF_ENCODER_SVT
  | :VIPS_FOREIGN_HEIF_ENCODER_X265

vips_foreign_keep()

@type vips_foreign_keep() :: [
  :VIPS_FOREIGN_KEEP_NONE
  | :VIPS_FOREIGN_KEEP_EXIF
  | :VIPS_FOREIGN_KEEP_XMP
  | :VIPS_FOREIGN_KEEP_IPTC
  | :VIPS_FOREIGN_KEEP_ICC
  | :VIPS_FOREIGN_KEEP_OTHER
]

vips_foreign_png_filter()

@type vips_foreign_png_filter() :: [
  :VIPS_FOREIGN_PNG_FILTER_NONE
  | :VIPS_FOREIGN_PNG_FILTER_SUB
  | :VIPS_FOREIGN_PNG_FILTER_UP
  | :VIPS_FOREIGN_PNG_FILTER_AVG
  | :VIPS_FOREIGN_PNG_FILTER_PAETH
]

vips_foreign_subsample()

@type vips_foreign_subsample() ::
  :VIPS_FOREIGN_SUBSAMPLE_AUTO
  | :VIPS_FOREIGN_SUBSAMPLE_ON
  | :VIPS_FOREIGN_SUBSAMPLE_OFF

vips_foreign_tiff_compression()

@type vips_foreign_tiff_compression() ::
  :VIPS_FOREIGN_TIFF_COMPRESSION_NONE
  | :VIPS_FOREIGN_TIFF_COMPRESSION_JPEG
  | :VIPS_FOREIGN_TIFF_COMPRESSION_DEFLATE
  | :VIPS_FOREIGN_TIFF_COMPRESSION_PACKBITS
  | :VIPS_FOREIGN_TIFF_COMPRESSION_CCITTFAX4
  | :VIPS_FOREIGN_TIFF_COMPRESSION_LZW
  | :VIPS_FOREIGN_TIFF_COMPRESSION_WEBP
  | :VIPS_FOREIGN_TIFF_COMPRESSION_ZSTD
  | :VIPS_FOREIGN_TIFF_COMPRESSION_JP2K

vips_foreign_tiff_predictor()

@type vips_foreign_tiff_predictor() ::
  :VIPS_FOREIGN_TIFF_PREDICTOR_NONE
  | :VIPS_FOREIGN_TIFF_PREDICTOR_HORIZONTAL
  | :VIPS_FOREIGN_TIFF_PREDICTOR_FLOAT

vips_foreign_tiff_resunit()

@type vips_foreign_tiff_resunit() ::
  :VIPS_FOREIGN_TIFF_RESUNIT_CM | :VIPS_FOREIGN_TIFF_RESUNIT_INCH

vips_foreign_webp_preset()

@type vips_foreign_webp_preset() ::
  :VIPS_FOREIGN_WEBP_PRESET_DEFAULT
  | :VIPS_FOREIGN_WEBP_PRESET_PICTURE
  | :VIPS_FOREIGN_WEBP_PRESET_PHOTO
  | :VIPS_FOREIGN_WEBP_PRESET_DRAWING
  | :VIPS_FOREIGN_WEBP_PRESET_ICON
  | :VIPS_FOREIGN_WEBP_PRESET_TEXT

vips_intent()

@type vips_intent() ::
  :VIPS_INTENT_PERCEPTUAL
  | :VIPS_INTENT_RELATIVE
  | :VIPS_INTENT_SATURATION
  | :VIPS_INTENT_ABSOLUTE

vips_interesting()

@type vips_interesting() ::
  :VIPS_INTERESTING_NONE
  | :VIPS_INTERESTING_CENTRE
  | :VIPS_INTERESTING_ENTROPY
  | :VIPS_INTERESTING_ATTENTION
  | :VIPS_INTERESTING_LOW
  | :VIPS_INTERESTING_HIGH
  | :VIPS_INTERESTING_ALL

vips_interpretation()

@type vips_interpretation() ::
  :VIPS_INTERPRETATION_ERROR
  | :VIPS_INTERPRETATION_MULTIBAND
  | :VIPS_INTERPRETATION_B_W
  | :VIPS_INTERPRETATION_HISTOGRAM
  | :VIPS_INTERPRETATION_XYZ
  | :VIPS_INTERPRETATION_LAB
  | :VIPS_INTERPRETATION_CMYK
  | :VIPS_INTERPRETATION_LABQ
  | :VIPS_INTERPRETATION_RGB
  | :VIPS_INTERPRETATION_CMC
  | :VIPS_INTERPRETATION_LCH
  | :VIPS_INTERPRETATION_LABS
  | :VIPS_INTERPRETATION_sRGB
  | :VIPS_INTERPRETATION_YXY
  | :VIPS_INTERPRETATION_FOURIER
  | :VIPS_INTERPRETATION_RGB16
  | :VIPS_INTERPRETATION_GREY16
  | :VIPS_INTERPRETATION_MATRIX
  | :VIPS_INTERPRETATION_scRGB
  | :VIPS_INTERPRETATION_HSV

vips_kernel()

@type vips_kernel() ::
  :VIPS_KERNEL_NEAREST
  | :VIPS_KERNEL_LINEAR
  | :VIPS_KERNEL_CUBIC
  | :VIPS_KERNEL_MITCHELL
  | :VIPS_KERNEL_LANCZOS2
  | :VIPS_KERNEL_LANCZOS3

vips_operation_boolean()

@type vips_operation_boolean() ::
  :VIPS_OPERATION_BOOLEAN_AND
  | :VIPS_OPERATION_BOOLEAN_OR
  | :VIPS_OPERATION_BOOLEAN_EOR
  | :VIPS_OPERATION_BOOLEAN_LSHIFT
  | :VIPS_OPERATION_BOOLEAN_RSHIFT

vips_operation_complex2()

@type vips_operation_complex2() :: :VIPS_OPERATION_COMPLEX2_CROSS_PHASE

vips_operation_complex()

@type vips_operation_complex() ::
  :VIPS_OPERATION_COMPLEX_POLAR
  | :VIPS_OPERATION_COMPLEX_RECT
  | :VIPS_OPERATION_COMPLEX_CONJ

vips_operation_complexget()

@type vips_operation_complexget() ::
  :VIPS_OPERATION_COMPLEXGET_REAL | :VIPS_OPERATION_COMPLEXGET_IMAG

vips_operation_math2()

@type vips_operation_math2() ::
  :VIPS_OPERATION_MATH2_POW
  | :VIPS_OPERATION_MATH2_WOP
  | :VIPS_OPERATION_MATH2_ATAN2

vips_operation_math()

@type vips_operation_math() ::
  :VIPS_OPERATION_MATH_SIN
  | :VIPS_OPERATION_MATH_COS
  | :VIPS_OPERATION_MATH_TAN
  | :VIPS_OPERATION_MATH_ASIN
  | :VIPS_OPERATION_MATH_ACOS
  | :VIPS_OPERATION_MATH_ATAN
  | :VIPS_OPERATION_MATH_LOG
  | :VIPS_OPERATION_MATH_LOG10
  | :VIPS_OPERATION_MATH_EXP
  | :VIPS_OPERATION_MATH_EXP10
  | :VIPS_OPERATION_MATH_SINH
  | :VIPS_OPERATION_MATH_COSH
  | :VIPS_OPERATION_MATH_TANH
  | :VIPS_OPERATION_MATH_ASINH
  | :VIPS_OPERATION_MATH_ACOSH
  | :VIPS_OPERATION_MATH_ATANH

vips_operation_morphology()

@type vips_operation_morphology() ::
  :VIPS_OPERATION_MORPHOLOGY_ERODE | :VIPS_OPERATION_MORPHOLOGY_DILATE

vips_operation_relational()

@type vips_operation_relational() ::
  :VIPS_OPERATION_RELATIONAL_EQUAL
  | :VIPS_OPERATION_RELATIONAL_NOTEQ
  | :VIPS_OPERATION_RELATIONAL_LESS
  | :VIPS_OPERATION_RELATIONAL_LESSEQ
  | :VIPS_OPERATION_RELATIONAL_MORE
  | :VIPS_OPERATION_RELATIONAL_MOREEQ

vips_operation_round()

@type vips_operation_round() ::
  :VIPS_OPERATION_ROUND_RINT
  | :VIPS_OPERATION_ROUND_CEIL
  | :VIPS_OPERATION_ROUND_FLOOR

vips_pcs()

@type vips_pcs() :: :VIPS_PCS_LAB | :VIPS_PCS_XYZ

vips_precision()

@type vips_precision() ::
  :VIPS_PRECISION_INTEGER | :VIPS_PRECISION_FLOAT | :VIPS_PRECISION_APPROXIMATE

vips_region_shrink()

@type vips_region_shrink() ::
  :VIPS_REGION_SHRINK_MEAN
  | :VIPS_REGION_SHRINK_MEDIAN
  | :VIPS_REGION_SHRINK_MODE
  | :VIPS_REGION_SHRINK_MAX
  | :VIPS_REGION_SHRINK_MIN
  | :VIPS_REGION_SHRINK_NEAREST

vips_size()

@type vips_size() ::
  :VIPS_SIZE_BOTH | :VIPS_SIZE_UP | :VIPS_SIZE_DOWN | :VIPS_SIZE_FORCE

vips_text_wrap()

@type vips_text_wrap() ::
  :VIPS_TEXT_WRAP_WORD
  | :VIPS_TEXT_WRAP_CHAR
  | :VIPS_TEXT_WRAP_WORD_CHAR
  | :VIPS_TEXT_WRAP_NONE

Functions

abs(input)

@spec abs(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Absolute value of an image

Arguments

  • input - Input image

abs!(input)

Absolute value of an image

Arguments

  • input - Input image

add(left, right)

@spec add(Vix.Vips.Image.t(), Vix.Vips.Image.t()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Add two images

Arguments

  • left - Left-hand image argument
  • right - Right-hand image argument

add!(left, right)

Add two images

Arguments

  • left - Left-hand image argument
  • right - Right-hand image argument

affine(input, matrix, optional \\ [])

@spec affine(Vix.Vips.Image.t(), [float()],
  extend: vips_extend(),
  premultiplied: boolean(),
  background: [float()],
  idy: float(),
  idx: float(),
  ody: float(),
  odx: float(),
  oarea: [integer()],
  interpolate: Vix.Vips.Interpolate.t()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Affine transform of an image

Arguments

  • input - Input image argument
  • matrix - Transformation matrix

Optional

  • extend - How to generate the extra pixels. Default: :VIPS_EXTEND_BACKGROUND
  • premultiplied - Images have premultiplied alpha. Default: false
  • background - Background value. Default: nil
  • idy - Vertical input displacement. Default: 0.0
  • idx - Horizontal input displacement. Default: 0.0
  • ody - Vertical output displacement. Default: 0.0
  • odx - Horizontal output displacement. Default: 0.0
  • oarea - Area of output to generate. Default: nil
  • interpolate - Interpolate pixels with this.

affine!(input, matrix, optional \\ [])

@spec affine!(Vix.Vips.Image.t(), [float()],
  extend: vips_extend(),
  premultiplied: boolean(),
  background: [float()],
  idy: float(),
  idx: float(),
  ody: float(),
  odx: float(),
  oarea: [integer()],
  interpolate: Vix.Vips.Interpolate.t()
) :: Vix.Vips.Image.t() | no_return()

Affine transform of an image

Arguments

  • input - Input image argument
  • matrix - Transformation matrix

Optional

  • extend - How to generate the extra pixels. Default: :VIPS_EXTEND_BACKGROUND
  • premultiplied - Images have premultiplied alpha. Default: false
  • background - Background value. Default: nil
  • idy - Vertical input displacement. Default: 0.0
  • idx - Horizontal input displacement. Default: 0.0
  • ody - Vertical output displacement. Default: 0.0
  • odx - Horizontal output displacement. Default: 0.0
  • oarea - Area of output to generate. Default: nil
  • interpolate - Interpolate pixels with this.

arrayjoin(input, optional \\ [])

@spec arrayjoin([Vix.Vips.Image.t()],
  vspacing: integer(),
  hspacing: integer(),
  valign: vips_align(),
  halign: vips_align(),
  background: [float()],
  shim: integer(),
  across: integer()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Join an array of images

Arguments

  • input - Array of input images

Optional

  • vspacing - Vertical spacing between images. Default: 1
  • hspacing - Horizontal spacing between images. Default: 1
  • valign - Align on the top, centre or bottom. Default: :VIPS_ALIGN_LOW
  • halign - Align on the left, centre or right. Default: :VIPS_ALIGN_LOW
  • background - Colour for new pixels. Default: nil
  • shim - Pixels between images. Default: 0
  • across - Number of images across grid. Default: 1

arrayjoin!(input, optional \\ [])

@spec arrayjoin!([Vix.Vips.Image.t()],
  vspacing: integer(),
  hspacing: integer(),
  valign: vips_align(),
  halign: vips_align(),
  background: [float()],
  shim: integer(),
  across: integer()
) :: Vix.Vips.Image.t() | no_return()

Join an array of images

Arguments

  • input - Array of input images

Optional

  • vspacing - Vertical spacing between images. Default: 1
  • hspacing - Horizontal spacing between images. Default: 1
  • valign - Align on the top, centre or bottom. Default: :VIPS_ALIGN_LOW
  • halign - Align on the left, centre or right. Default: :VIPS_ALIGN_LOW
  • background - Colour for new pixels. Default: nil
  • shim - Pixels between images. Default: 0
  • across - Number of images across grid. Default: 1

autorot(input)

@spec autorot(Vix.Vips.Image.t()) ::
  {:ok, {Vix.Vips.Image.t(), %{flip: boolean(), angle: vips_angle()}}}
  | {:error, term()}

Autorotate image by exif tag

Arguments

  • input - Input image

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flip - Whether the image was flipped or not. (boolean())
  • angle - Angle image was rotated by. (vips_angle)

autorot!(input)

@spec autorot!(Vix.Vips.Image.t()) ::
  {Vix.Vips.Image.t(), %{flip: boolean(), angle: vips_angle()}} | no_return()

Autorotate image by exif tag

Arguments

  • input - Input image

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flip - Whether the image was flipped or not. (boolean())
  • angle - Angle image was rotated by. (vips_angle)

avg(input)

@spec avg(Vix.Vips.Image.t()) :: {:ok, float()} | {:error, term()}

Find image average

Arguments

  • input - Input image

avg!(input)

@spec avg!(Vix.Vips.Image.t()) :: float() | no_return()

Find image average

Arguments

  • input - Input image

bandbool(input, boolean)

@spec bandbool(Vix.Vips.Image.t(), vips_operation_boolean()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Boolean operation across image bands

Arguments

  • input - Input image argument
  • boolean - Boolean to perform

bandbool!(input, boolean)

Boolean operation across image bands

Arguments

  • input - Input image argument
  • boolean - Boolean to perform

bandfold(input, optional \\ [])

@spec bandfold(Vix.Vips.Image.t(), [{:factor, integer()}]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Fold up x axis into bands

Arguments

  • input - Input image

Optional

  • factor - Fold by this factor. Default: 0

bandfold!(input, optional \\ [])

@spec bandfold!(Vix.Vips.Image.t(), [{:factor, integer()}]) ::
  Vix.Vips.Image.t() | no_return()

Fold up x axis into bands

Arguments

  • input - Input image

Optional

  • factor - Fold by this factor. Default: 0

bandjoin(input)

@spec bandjoin([Vix.Vips.Image.t()]) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Bandwise join a set of images

Arguments

  • input - Array of input images

bandjoin!(input)

@spec bandjoin!([Vix.Vips.Image.t()]) :: Vix.Vips.Image.t() | no_return()

Bandwise join a set of images

Arguments

  • input - Array of input images

bandjoin_const(input, c)

@spec bandjoin_const(Vix.Vips.Image.t(), [float()]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Append a constant band to an image

Arguments

  • input - Input image
  • c - Array of constants to add

bandjoin_const!(input, c)

@spec bandjoin_const!(Vix.Vips.Image.t(), [float()]) ::
  Vix.Vips.Image.t() | no_return()

Append a constant band to an image

Arguments

  • input - Input image
  • c - Array of constants to add

bandmean(input)

@spec bandmean(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Band-wise average

Arguments

  • input - Input image argument

bandmean!(input)

@spec bandmean!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Band-wise average

Arguments

  • input - Input image argument

bandrank(input, optional \\ [])

@spec bandrank([Vix.Vips.Image.t()], [{:index, integer()}]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Band-wise rank of a set of images

Arguments

  • input - Array of input images

Optional

  • index - Select this band element from sorted list. Default: -1

bandrank!(input, optional \\ [])

@spec bandrank!([Vix.Vips.Image.t()], [{:index, integer()}]) ::
  Vix.Vips.Image.t() | no_return()

Band-wise rank of a set of images

Arguments

  • input - Array of input images

Optional

  • index - Select this band element from sorted list. Default: -1

bandunfold(input, optional \\ [])

@spec bandunfold(Vix.Vips.Image.t(), [{:factor, integer()}]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Unfold image bands into x axis

Arguments

  • input - Input image

Optional

  • factor - Unfold by this factor. Default: 0

bandunfold!(input, optional \\ [])

@spec bandunfold!(Vix.Vips.Image.t(), [{:factor, integer()}]) ::
  Vix.Vips.Image.t() | no_return()

Unfold image bands into x axis

Arguments

  • input - Input image

Optional

  • factor - Unfold by this factor. Default: 0

black(width, height, optional \\ [])

@spec black(integer(), integer(), [{:bands, integer()}]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Make a black image

Arguments

  • width - Image width in pixels
  • height - Image height in pixels

Optional

  • bands - Number of bands in image. Default: 1

black!(width, height, optional \\ [])

@spec black!(integer(), integer(), [{:bands, integer()}]) ::
  Vix.Vips.Image.t() | no_return()

Make a black image

Arguments

  • width - Image width in pixels
  • height - Image height in pixels

Optional

  • bands - Number of bands in image. Default: 1

boolean(left, right, boolean)

@spec boolean(Vix.Vips.Image.t(), Vix.Vips.Image.t(), vips_operation_boolean()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Boolean operation on two images

Arguments

  • left - Left-hand image argument
  • right - Right-hand image argument
  • boolean - Boolean to perform

boolean!(left, right, boolean)

Boolean operation on two images

Arguments

  • left - Left-hand image argument
  • right - Right-hand image argument
  • boolean - Boolean to perform

boolean_const(input, boolean, c)

@spec boolean_const(Vix.Vips.Image.t(), vips_operation_boolean(), [float()]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Boolean operations against a constant

Arguments

  • input - Input image
  • boolean - Boolean to perform
  • c - Array of constants

boolean_const!(input, boolean, c)

@spec boolean_const!(Vix.Vips.Image.t(), vips_operation_boolean(), [float()]) ::
  Vix.Vips.Image.t() | no_return()

Boolean operations against a constant

Arguments

  • input - Input image
  • boolean - Boolean to perform
  • c - Array of constants

buildlut(input)

@spec buildlut(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Build a look-up table

Arguments

  • input - Matrix of XY coordinates

buildlut!(input)

@spec buildlut!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Build a look-up table

Arguments

  • input - Matrix of XY coordinates

byteswap(input)

@spec byteswap(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Byteswap an image

Arguments

  • input - Input image

byteswap!(input)

@spec byteswap!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Byteswap an image

Arguments

  • input - Input image

cache(input, optional \\ [])

@spec cache(Vix.Vips.Image.t(),
  "tile-width": integer(),
  "tile-height": integer(),
  "max-tiles": integer()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Cache an image

Arguments

  • input - Input image

Optional

  • tile-width - Tile width in pixels. Default: 128
  • tile-height - Tile height in pixels. Default: 128
  • max-tiles - Maximum number of tiles to cache. Default: 1000

cache!(input, optional \\ [])

@spec cache!(Vix.Vips.Image.t(),
  "tile-width": integer(),
  "tile-height": integer(),
  "max-tiles": integer()
) :: Vix.Vips.Image.t() | no_return()

Cache an image

Arguments

  • input - Input image

Optional

  • tile-width - Tile width in pixels. Default: 128
  • tile-height - Tile height in pixels. Default: 128
  • max-tiles - Maximum number of tiles to cache. Default: 1000

canny(input, optional \\ [])

@spec canny(Vix.Vips.Image.t(), precision: vips_precision(), sigma: float()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Canny edge detector

Arguments

  • input - Input image

Optional

  • precision - Convolve with this precision. Default: :VIPS_PRECISION_FLOAT
  • sigma - Sigma of Gaussian. Default: 1.4

canny!(input, optional \\ [])

@spec canny!(Vix.Vips.Image.t(), precision: vips_precision(), sigma: float()) ::
  Vix.Vips.Image.t() | no_return()

Canny edge detector

Arguments

  • input - Input image

Optional

  • precision - Convolve with this precision. Default: :VIPS_PRECISION_FLOAT
  • sigma - Sigma of Gaussian. Default: 1.4

case(index, cases)

@spec case(Vix.Vips.Image.t(), [Vix.Vips.Image.t()]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Use pixel values to pick cases from an array of images

Arguments

  • index - Index image
  • cases - Array of case images

case!(index, cases)

Use pixel values to pick cases from an array of images

Arguments

  • index - Index image
  • cases - Array of case images

cast(input, format, optional \\ [])

@spec cast(Vix.Vips.Image.t(), vips_band_format(), [{:shift, boolean()}]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Cast an image

Arguments

  • input - Input image
  • format - Format to cast to

Optional

  • shift - Shift integer values up and down. Default: false

cast!(input, format, optional \\ [])

@spec cast!(Vix.Vips.Image.t(), vips_band_format(), [{:shift, boolean()}]) ::
  Vix.Vips.Image.t() | no_return()

Cast an image

Arguments

  • input - Input image
  • format - Format to cast to

Optional

  • shift - Shift integer values up and down. Default: false

cmc2lch(input)

@spec cmc2lch(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Transform lch to cmc

Arguments

  • input - Input image

cmc2lch!(input)

@spec cmc2lch!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Transform lch to cmc

Arguments

  • input - Input image

cmyk2xyz(input)

@spec cmyk2xyz(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Transform cmyk to xyz

Arguments

  • input - Input image

cmyk2xyz!(input)

@spec cmyk2xyz!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Transform cmyk to xyz

Arguments

  • input - Input image

colourspace(input, space, optional \\ [])

@spec colourspace(Vix.Vips.Image.t(), vips_interpretation(), [
  {:"source-space", vips_interpretation()}
]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Convert to a new colorspace

Arguments

  • input - Input image
  • space - Destination color space

Optional

  • source-space - Source color space. Default: :VIPS_INTERPRETATION_sRGB

colourspace!(input, space, optional \\ [])

@spec colourspace!(Vix.Vips.Image.t(), vips_interpretation(), [
  {:"source-space", vips_interpretation()}
]) ::
  Vix.Vips.Image.t() | no_return()

Convert to a new colorspace

Arguments

  • input - Input image
  • space - Destination color space

Optional

  • source-space - Source color space. Default: :VIPS_INTERPRETATION_sRGB

compass(input, mask, optional \\ [])

@spec compass(Vix.Vips.Image.t(), Vix.Vips.Image.t(),
  cluster: integer(),
  layers: integer(),
  precision: vips_precision(),
  combine: vips_combine(),
  angle: vips_angle45(),
  times: integer()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Convolve with rotating mask

Arguments

  • input - Input image argument
  • mask - Input matrix image

Optional

  • cluster - Cluster lines closer than this in approximation. Default: 1
  • layers - Use this many layers in approximation. Default: 5
  • precision - Convolve with this precision. Default: :VIPS_PRECISION_FLOAT
  • combine - Combine convolution results like this. Default: :VIPS_COMBINE_MAX
  • angle - Rotate mask by this much between convolutions. Default: :VIPS_ANGLE45_D90
  • times - Rotate and convolve this many times. Default: 2

compass!(input, mask, optional \\ [])

@spec compass!(Vix.Vips.Image.t(), Vix.Vips.Image.t(),
  cluster: integer(),
  layers: integer(),
  precision: vips_precision(),
  combine: vips_combine(),
  angle: vips_angle45(),
  times: integer()
) :: Vix.Vips.Image.t() | no_return()

Convolve with rotating mask

Arguments

  • input - Input image argument
  • mask - Input matrix image

Optional

  • cluster - Cluster lines closer than this in approximation. Default: 1
  • layers - Use this many layers in approximation. Default: 5
  • precision - Convolve with this precision. Default: :VIPS_PRECISION_FLOAT
  • combine - Combine convolution results like this. Default: :VIPS_COMBINE_MAX
  • angle - Rotate mask by this much between convolutions. Default: :VIPS_ANGLE45_D90
  • times - Rotate and convolve this many times. Default: 2

complex2(left, right, cmplx)

@spec complex2(Vix.Vips.Image.t(), Vix.Vips.Image.t(), vips_operation_complex2()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Complex binary operations on two images

Arguments

  • left - Left-hand image argument
  • right - Right-hand image argument
  • cmplx - Binary complex operation to perform

complex2!(left, right, cmplx)

Complex binary operations on two images

Arguments

  • left - Left-hand image argument
  • right - Right-hand image argument
  • cmplx - Binary complex operation to perform

complex(input, cmplx)

@spec complex(Vix.Vips.Image.t(), vips_operation_complex()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Perform a complex operation on an image

Arguments

  • input - Input image
  • cmplx - Complex to perform

complex!(input, cmplx)

Perform a complex operation on an image

Arguments

  • input - Input image
  • cmplx - Complex to perform

complexform(left, right)

@spec complexform(Vix.Vips.Image.t(), Vix.Vips.Image.t()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Form a complex image from two real images

Arguments

  • left - Left-hand image argument
  • right - Right-hand image argument

complexform!(left, right)

@spec complexform!(Vix.Vips.Image.t(), Vix.Vips.Image.t()) ::
  Vix.Vips.Image.t() | no_return()

Form a complex image from two real images

Arguments

  • left - Left-hand image argument
  • right - Right-hand image argument

complexget(input, get)

@spec complexget(Vix.Vips.Image.t(), vips_operation_complexget()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Get a component from a complex image

Arguments

  • input - Input image
  • get - Complex to perform

complexget!(input, get)

Get a component from a complex image

Arguments

  • input - Input image
  • get - Complex to perform

composite2(base, overlay, mode, optional \\ [])

@spec composite2(Vix.Vips.Image.t(), Vix.Vips.Image.t(), vips_blend_mode(),
  premultiplied: boolean(),
  "compositing-space": vips_interpretation(),
  y: integer(),
  x: integer()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Blend a pair of images with a blend mode

Arguments

  • base - Base image
  • overlay - Overlay image
  • mode - VipsBlendMode to join with

Optional

  • premultiplied - Images have premultiplied alpha. Default: false
  • compositing-space - Composite images in this colour space. Default: :VIPS_INTERPRETATION_sRGB
  • y - y position of overlay. Default: 0
  • x - x position of overlay. Default: 0

composite2!(base, overlay, mode, optional \\ [])

@spec composite2!(Vix.Vips.Image.t(), Vix.Vips.Image.t(), vips_blend_mode(),
  premultiplied: boolean(),
  "compositing-space": vips_interpretation(),
  y: integer(),
  x: integer()
) :: Vix.Vips.Image.t() | no_return()

Blend a pair of images with a blend mode

Arguments

  • base - Base image
  • overlay - Overlay image
  • mode - VipsBlendMode to join with

Optional

  • premultiplied - Images have premultiplied alpha. Default: false
  • compositing-space - Composite images in this colour space. Default: :VIPS_INTERPRETATION_sRGB
  • y - y position of overlay. Default: 0
  • x - x position of overlay. Default: 0

composite(input, mode, optional \\ [])

@spec composite([Vix.Vips.Image.t()], [vips_blend_mode()],
  premultiplied: boolean(),
  "compositing-space": vips_interpretation(),
  y: [integer()],
  x: [integer()]
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Blend an array of images with an array of blend modes

Arguments

  • input - Array of input images
  • mode - Array of VipsBlendMode to join with

Optional

  • premultiplied - Images have premultiplied alpha. Default: false
  • compositing-space - Composite images in this colour space. Default: :VIPS_INTERPRETATION_sRGB
  • y - Array of y coordinates to join at. Default: nil
  • x - Array of x coordinates to join at. Default: nil

composite!(input, mode, optional \\ [])

@spec composite!([Vix.Vips.Image.t()], [vips_blend_mode()],
  premultiplied: boolean(),
  "compositing-space": vips_interpretation(),
  y: [integer()],
  x: [integer()]
) :: Vix.Vips.Image.t() | no_return()

Blend an array of images with an array of blend modes

Arguments

  • input - Array of input images
  • mode - Array of VipsBlendMode to join with

Optional

  • premultiplied - Images have premultiplied alpha. Default: false
  • compositing-space - Composite images in this colour space. Default: :VIPS_INTERPRETATION_sRGB
  • y - Array of y coordinates to join at. Default: nil
  • x - Array of x coordinates to join at. Default: nil

conv(input, mask, optional \\ [])

@spec conv(Vix.Vips.Image.t(), Vix.Vips.Image.t(),
  cluster: integer(),
  layers: integer(),
  precision: vips_precision()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Convolution operation

Arguments

  • input - Input image argument
  • mask - Input matrix image

Optional

  • cluster - Cluster lines closer than this in approximation. Default: 1
  • layers - Use this many layers in approximation. Default: 5
  • precision - Convolve with this precision. Default: :VIPS_PRECISION_FLOAT

conv!(input, mask, optional \\ [])

@spec conv!(Vix.Vips.Image.t(), Vix.Vips.Image.t(),
  cluster: integer(),
  layers: integer(),
  precision: vips_precision()
) :: Vix.Vips.Image.t() | no_return()

Convolution operation

Arguments

  • input - Input image argument
  • mask - Input matrix image

Optional

  • cluster - Cluster lines closer than this in approximation. Default: 1
  • layers - Use this many layers in approximation. Default: 5
  • precision - Convolve with this precision. Default: :VIPS_PRECISION_FLOAT

conva(input, mask, optional \\ [])

@spec conva(Vix.Vips.Image.t(), Vix.Vips.Image.t(),
  cluster: integer(),
  layers: integer()
) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Approximate integer convolution

Arguments

  • input - Input image argument
  • mask - Input matrix image

Optional

  • cluster - Cluster lines closer than this in approximation. Default: 1
  • layers - Use this many layers in approximation. Default: 5

conva!(input, mask, optional \\ [])

@spec conva!(Vix.Vips.Image.t(), Vix.Vips.Image.t(),
  cluster: integer(),
  layers: integer()
) ::
  Vix.Vips.Image.t() | no_return()

Approximate integer convolution

Arguments

  • input - Input image argument
  • mask - Input matrix image

Optional

  • cluster - Cluster lines closer than this in approximation. Default: 1
  • layers - Use this many layers in approximation. Default: 5

convasep(input, mask, optional \\ [])

@spec convasep(Vix.Vips.Image.t(), Vix.Vips.Image.t(), [{:layers, integer()}]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Approximate separable integer convolution

Arguments

  • input - Input image argument
  • mask - Input matrix image

Optional

  • layers - Use this many layers in approximation. Default: 5

convasep!(input, mask, optional \\ [])

@spec convasep!(Vix.Vips.Image.t(), Vix.Vips.Image.t(), [{:layers, integer()}]) ::
  Vix.Vips.Image.t() | no_return()

Approximate separable integer convolution

Arguments

  • input - Input image argument
  • mask - Input matrix image

Optional

  • layers - Use this many layers in approximation. Default: 5

convf(input, mask)

@spec convf(Vix.Vips.Image.t(), Vix.Vips.Image.t()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Float convolution operation

Arguments

  • input - Input image argument
  • mask - Input matrix image

convf!(input, mask)

Float convolution operation

Arguments

  • input - Input image argument
  • mask - Input matrix image

convi(input, mask)

@spec convi(Vix.Vips.Image.t(), Vix.Vips.Image.t()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Int convolution operation

Arguments

  • input - Input image argument
  • mask - Input matrix image

convi!(input, mask)

Int convolution operation

Arguments

  • input - Input image argument
  • mask - Input matrix image

convsep(input, mask, optional \\ [])

@spec convsep(Vix.Vips.Image.t(), Vix.Vips.Image.t(),
  cluster: integer(),
  layers: integer(),
  precision: vips_precision()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Separable convolution operation

Arguments

  • input - Input image argument
  • mask - Input matrix image

Optional

  • cluster - Cluster lines closer than this in approximation. Default: 1
  • layers - Use this many layers in approximation. Default: 5
  • precision - Convolve with this precision. Default: :VIPS_PRECISION_FLOAT

convsep!(input, mask, optional \\ [])

@spec convsep!(Vix.Vips.Image.t(), Vix.Vips.Image.t(),
  cluster: integer(),
  layers: integer(),
  precision: vips_precision()
) :: Vix.Vips.Image.t() | no_return()

Separable convolution operation

Arguments

  • input - Input image argument
  • mask - Input matrix image

Optional

  • cluster - Cluster lines closer than this in approximation. Default: 1
  • layers - Use this many layers in approximation. Default: 5
  • precision - Convolve with this precision. Default: :VIPS_PRECISION_FLOAT

copy(input, optional \\ [])

@spec copy(Vix.Vips.Image.t(),
  yoffset: integer(),
  xoffset: integer(),
  yres: float(),
  xres: float(),
  interpretation: vips_interpretation(),
  coding: vips_coding(),
  format: vips_band_format(),
  bands: integer(),
  height: integer(),
  width: integer(),
  swap: boolean()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Copy an image

Arguments

  • input - Input image

Optional

  • yoffset - Vertical offset of origin. Default: 0
  • xoffset - Horizontal offset of origin. Default: 0
  • yres - Vertical resolution in pixels/mm. Default: 0.0
  • xres - Horizontal resolution in pixels/mm. Default: 0.0
  • interpretation - Pixel interpretation. Default: :VIPS_INTERPRETATION_MULTIBAND
  • coding - Pixel coding. Default: :VIPS_CODING_NONE
  • format - Pixel format in image. Default: :VIPS_FORMAT_UCHAR
  • bands - Number of bands in image. Default: 0
  • height - Image height in pixels. Default: 0
  • width - Image width in pixels. Default: 0
  • swap - Swap bytes in image between little and big-endian. Default: false

copy!(input, optional \\ [])

@spec copy!(Vix.Vips.Image.t(),
  yoffset: integer(),
  xoffset: integer(),
  yres: float(),
  xres: float(),
  interpretation: vips_interpretation(),
  coding: vips_coding(),
  format: vips_band_format(),
  bands: integer(),
  height: integer(),
  width: integer(),
  swap: boolean()
) :: Vix.Vips.Image.t() | no_return()

Copy an image

Arguments

  • input - Input image

Optional

  • yoffset - Vertical offset of origin. Default: 0
  • xoffset - Horizontal offset of origin. Default: 0
  • yres - Vertical resolution in pixels/mm. Default: 0.0
  • xres - Horizontal resolution in pixels/mm. Default: 0.0
  • interpretation - Pixel interpretation. Default: :VIPS_INTERPRETATION_MULTIBAND
  • coding - Pixel coding. Default: :VIPS_CODING_NONE
  • format - Pixel format in image. Default: :VIPS_FORMAT_UCHAR
  • bands - Number of bands in image. Default: 0
  • height - Image height in pixels. Default: 0
  • width - Image width in pixels. Default: 0
  • swap - Swap bytes in image between little and big-endian. Default: false

countlines(input, direction)

@spec countlines(Vix.Vips.Image.t(), vips_direction()) ::
  {:ok, float()} | {:error, term()}

Count lines in an image

Arguments

  • input - Input image argument
  • direction - Countlines left-right or up-down

countlines!(input, direction)

@spec countlines!(Vix.Vips.Image.t(), vips_direction()) :: float() | no_return()

Count lines in an image

Arguments

  • input - Input image argument
  • direction - Countlines left-right or up-down

csvload(filename, optional \\ [])

@spec csvload(String.t(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  separator: String.t(),
  whitespace: String.t(),
  lines: integer(),
  skip: integer()
) ::
  {:ok, {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}}} | {:error, term()}

Load csv

Arguments

  • filename - Filename to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • separator - Set of separator characters. Default: ";,\t"
  • whitespace - Set of whitespace characters. Default: " "
  • lines - Read this many lines from the file. Default: 0
  • skip - Skip this many lines at the start of the file. Default: 0

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

csvload!(filename, optional \\ [])

@spec csvload!(String.t(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  separator: String.t(),
  whitespace: String.t(),
  lines: integer(),
  skip: integer()
) :: {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}} | no_return()

Load csv

Arguments

  • filename - Filename to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • separator - Set of separator characters. Default: ";,\t"
  • whitespace - Set of whitespace characters. Default: " "
  • lines - Read this many lines from the file. Default: 0
  • skip - Skip this many lines at the start of the file. Default: 0

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

csvsave(input, filename, optional \\ [])

@spec csvsave(Vix.Vips.Image.t(), String.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  separator: String.t()
) :: :ok | {:error, term()}

Save image to csv

Arguments

  • input - Image to save
  • filename - Filename to save to

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • separator - Separator characters. Default: "\t"

csvsave!(input, filename, optional \\ [])

@spec csvsave!(Vix.Vips.Image.t(), String.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  separator: String.t()
) :: :ok | no_return()

Save image to csv

Arguments

  • input - Image to save
  • filename - Filename to save to

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • separator - Separator characters. Default: "\t"

de00(left, right)

@spec de00(Vix.Vips.Image.t(), Vix.Vips.Image.t()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Calculate de00

Arguments

  • left - Left-hand input image
  • right - Right-hand input image

de00!(left, right)

Calculate de00

Arguments

  • left - Left-hand input image
  • right - Right-hand input image

de76(left, right)

@spec de76(Vix.Vips.Image.t(), Vix.Vips.Image.t()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Calculate de76

Arguments

  • left - Left-hand input image
  • right - Right-hand input image

de76!(left, right)

Calculate de76

Arguments

  • left - Left-hand input image
  • right - Right-hand input image

decmc(left, right)

@spec decmc(Vix.Vips.Image.t(), Vix.Vips.Image.t()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Calculate decmc

Arguments

  • left - Left-hand input image
  • right - Right-hand input image

decmc!(left, right)

Calculate decmc

Arguments

  • left - Left-hand input image
  • right - Right-hand input image

deviate(input)

@spec deviate(Vix.Vips.Image.t()) :: {:ok, float()} | {:error, term()}

Find image standard deviation

Arguments

  • input - Input image

deviate!(input)

@spec deviate!(Vix.Vips.Image.t()) :: float() | no_return()

Find image standard deviation

Arguments

  • input - Input image

divide(left, right)

@spec divide(Vix.Vips.Image.t(), Vix.Vips.Image.t()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Divide two images

Arguments

  • left - Left-hand image argument
  • right - Right-hand image argument

divide!(left, right)

Divide two images

Arguments

  • left - Left-hand image argument
  • right - Right-hand image argument

dzsave(input, filename, optional \\ [])

@spec dzsave(Vix.Vips.Image.t(), String.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  basename: String.t(),
  "no-strip": boolean(),
  Q: integer(),
  id: String.t(),
  "skip-blanks": integer(),
  "region-shrink": vips_region_shrink(),
  compression: integer(),
  properties: boolean(),
  container: vips_foreign_dz_container(),
  angle: vips_angle(),
  depth: vips_foreign_dz_depth(),
  centre: boolean(),
  "tile-width": integer(),
  "tile-height": integer(),
  "tile-size": integer(),
  overlap: integer(),
  suffix: String.t(),
  layout: vips_foreign_dz_layout(),
  imagename: String.t(),
  dirname: String.t()
) :: :ok | {:error, term()}

Save image to deepzoom file

Arguments

  • input - Image to save
  • filename - Filename to save to

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • basename - Base name to save to. Default: nil
  • no-strip - Don't strip tile metadata. Default: false
  • Q - Q factor. Default: 75
  • id - Resource ID. Default: "https://example.com/iiif"
  • skip-blanks - Skip tiles which are nearly equal to the background. Default: -1
  • region-shrink - Method to shrink regions. Default: :VIPS_REGION_SHRINK_MEAN
  • compression - ZIP deflate compression level. Default: 0
  • properties - Write a properties file to the output directory. Default: false
  • container - Pyramid container type. Default: :VIPS_FOREIGN_DZ_CONTAINER_FS
  • angle - Rotate image during save. Default: :VIPS_ANGLE_D0
  • depth - Pyramid depth. Default: :VIPS_FOREIGN_DZ_DEPTH_ONEPIXEL
  • centre - Center image in tile. Default: false
  • tile-width - Tile width in pixels. Default: 254
  • tile-height - Tile height in pixels. Default: 254
  • tile-size - Tile size in pixels. Default: 254
  • overlap - Tile overlap in pixels. Default: 1
  • suffix - Filename suffix for tiles. Default: ".jpeg"
  • layout - Directory layout. Default: :VIPS_FOREIGN_DZ_LAYOUT_DZ
  • imagename - Image name. Default: nil
  • dirname - Directory name to save to. Default: nil

dzsave!(input, filename, optional \\ [])

@spec dzsave!(Vix.Vips.Image.t(), String.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  basename: String.t(),
  "no-strip": boolean(),
  Q: integer(),
  id: String.t(),
  "skip-blanks": integer(),
  "region-shrink": vips_region_shrink(),
  compression: integer(),
  properties: boolean(),
  container: vips_foreign_dz_container(),
  angle: vips_angle(),
  depth: vips_foreign_dz_depth(),
  centre: boolean(),
  "tile-width": integer(),
  "tile-height": integer(),
  "tile-size": integer(),
  overlap: integer(),
  suffix: String.t(),
  layout: vips_foreign_dz_layout(),
  imagename: String.t(),
  dirname: String.t()
) :: :ok | no_return()

Save image to deepzoom file

Arguments

  • input - Image to save
  • filename - Filename to save to

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • basename - Base name to save to. Default: nil
  • no-strip - Don't strip tile metadata. Default: false
  • Q - Q factor. Default: 75
  • id - Resource ID. Default: "https://example.com/iiif"
  • skip-blanks - Skip tiles which are nearly equal to the background. Default: -1
  • region-shrink - Method to shrink regions. Default: :VIPS_REGION_SHRINK_MEAN
  • compression - ZIP deflate compression level. Default: 0
  • properties - Write a properties file to the output directory. Default: false
  • container - Pyramid container type. Default: :VIPS_FOREIGN_DZ_CONTAINER_FS
  • angle - Rotate image during save. Default: :VIPS_ANGLE_D0
  • depth - Pyramid depth. Default: :VIPS_FOREIGN_DZ_DEPTH_ONEPIXEL
  • centre - Center image in tile. Default: false
  • tile-width - Tile width in pixels. Default: 254
  • tile-height - Tile height in pixels. Default: 254
  • tile-size - Tile size in pixels. Default: 254
  • overlap - Tile overlap in pixels. Default: 1
  • suffix - Filename suffix for tiles. Default: ".jpeg"
  • layout - Directory layout. Default: :VIPS_FOREIGN_DZ_LAYOUT_DZ
  • imagename - Image name. Default: nil
  • dirname - Directory name to save to. Default: nil

dzsave_buffer(input, optional \\ [])

@spec dzsave_buffer(Vix.Vips.Image.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  basename: String.t(),
  "no-strip": boolean(),
  Q: integer(),
  id: String.t(),
  "skip-blanks": integer(),
  "region-shrink": vips_region_shrink(),
  compression: integer(),
  properties: boolean(),
  container: vips_foreign_dz_container(),
  angle: vips_angle(),
  depth: vips_foreign_dz_depth(),
  centre: boolean(),
  "tile-width": integer(),
  "tile-height": integer(),
  "tile-size": integer(),
  overlap: integer(),
  suffix: String.t(),
  layout: vips_foreign_dz_layout(),
  imagename: String.t(),
  dirname: String.t()
) :: {:ok, binary()} | {:error, term()}

Save image to dz buffer

Arguments

  • input - Image to save

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • basename - Base name to save to. Default: nil
  • no-strip - Don't strip tile metadata. Default: false
  • Q - Q factor. Default: 75
  • id - Resource ID. Default: "https://example.com/iiif"
  • skip-blanks - Skip tiles which are nearly equal to the background. Default: -1
  • region-shrink - Method to shrink regions. Default: :VIPS_REGION_SHRINK_MEAN
  • compression - ZIP deflate compression level. Default: 0
  • properties - Write a properties file to the output directory. Default: false
  • container - Pyramid container type. Default: :VIPS_FOREIGN_DZ_CONTAINER_FS
  • angle - Rotate image during save. Default: :VIPS_ANGLE_D0
  • depth - Pyramid depth. Default: :VIPS_FOREIGN_DZ_DEPTH_ONEPIXEL
  • centre - Center image in tile. Default: false
  • tile-width - Tile width in pixels. Default: 254
  • tile-height - Tile height in pixels. Default: 254
  • tile-size - Tile size in pixels. Default: 254
  • overlap - Tile overlap in pixels. Default: 1
  • suffix - Filename suffix for tiles. Default: ".jpeg"
  • layout - Directory layout. Default: :VIPS_FOREIGN_DZ_LAYOUT_DZ
  • imagename - Image name. Default: nil
  • dirname - Directory name to save to. Default: nil

dzsave_buffer!(input, optional \\ [])

@spec dzsave_buffer!(Vix.Vips.Image.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  basename: String.t(),
  "no-strip": boolean(),
  Q: integer(),
  id: String.t(),
  "skip-blanks": integer(),
  "region-shrink": vips_region_shrink(),
  compression: integer(),
  properties: boolean(),
  container: vips_foreign_dz_container(),
  angle: vips_angle(),
  depth: vips_foreign_dz_depth(),
  centre: boolean(),
  "tile-width": integer(),
  "tile-height": integer(),
  "tile-size": integer(),
  overlap: integer(),
  suffix: String.t(),
  layout: vips_foreign_dz_layout(),
  imagename: String.t(),
  dirname: String.t()
) :: binary() | no_return()

Save image to dz buffer

Arguments

  • input - Image to save

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • basename - Base name to save to. Default: nil
  • no-strip - Don't strip tile metadata. Default: false
  • Q - Q factor. Default: 75
  • id - Resource ID. Default: "https://example.com/iiif"
  • skip-blanks - Skip tiles which are nearly equal to the background. Default: -1
  • region-shrink - Method to shrink regions. Default: :VIPS_REGION_SHRINK_MEAN
  • compression - ZIP deflate compression level. Default: 0
  • properties - Write a properties file to the output directory. Default: false
  • container - Pyramid container type. Default: :VIPS_FOREIGN_DZ_CONTAINER_FS
  • angle - Rotate image during save. Default: :VIPS_ANGLE_D0
  • depth - Pyramid depth. Default: :VIPS_FOREIGN_DZ_DEPTH_ONEPIXEL
  • centre - Center image in tile. Default: false
  • tile-width - Tile width in pixels. Default: 254
  • tile-height - Tile height in pixels. Default: 254
  • tile-size - Tile size in pixels. Default: 254
  • overlap - Tile overlap in pixels. Default: 1
  • suffix - Filename suffix for tiles. Default: ".jpeg"
  • layout - Directory layout. Default: :VIPS_FOREIGN_DZ_LAYOUT_DZ
  • imagename - Image name. Default: nil
  • dirname - Directory name to save to. Default: nil

embed(input, x, y, width, height, optional \\ [])

@spec embed(Vix.Vips.Image.t(), integer(), integer(), integer(), integer(),
  background: [float()],
  extend: vips_extend()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Embed an image in a larger image

Arguments

  • input - Input image
  • x - Left edge of input in output
  • y - Top edge of input in output
  • width - Image width in pixels
  • height - Image height in pixels

Optional

  • background - Color for background pixels. Default: nil
  • extend - How to generate the extra pixels. Default: :VIPS_EXTEND_BLACK

embed!(input, x, y, width, height, optional \\ [])

@spec embed!(Vix.Vips.Image.t(), integer(), integer(), integer(), integer(),
  background: [float()],
  extend: vips_extend()
) :: Vix.Vips.Image.t() | no_return()

Embed an image in a larger image

Arguments

  • input - Input image
  • x - Left edge of input in output
  • y - Top edge of input in output
  • width - Image width in pixels
  • height - Image height in pixels

Optional

  • background - Color for background pixels. Default: nil
  • extend - How to generate the extra pixels. Default: :VIPS_EXTEND_BLACK

extract_area(input, left, top, width, height)

@spec extract_area(Vix.Vips.Image.t(), integer(), integer(), integer(), integer()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Extract an area from an image

Arguments

  • input - Input image
  • left - Left edge of extract area
  • top - Top edge of extract area
  • width - Width of extract area
  • height - Height of extract area

extract_area!(input, left, top, width, height)

@spec extract_area!(Vix.Vips.Image.t(), integer(), integer(), integer(), integer()) ::
  Vix.Vips.Image.t() | no_return()

Extract an area from an image

Arguments

  • input - Input image
  • left - Left edge of extract area
  • top - Top edge of extract area
  • width - Width of extract area
  • height - Height of extract area

extract_band(input, band, optional \\ [])

@spec extract_band(Vix.Vips.Image.t(), integer(), [{:n, integer()}]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Extract band from an image

Arguments

  • input - Input image
  • band - Band to extract

Optional

  • n - Number of bands to extract. Default: 1

extract_band!(input, band, optional \\ [])

@spec extract_band!(Vix.Vips.Image.t(), integer(), [{:n, integer()}]) ::
  Vix.Vips.Image.t() | no_return()

Extract band from an image

Arguments

  • input - Input image
  • band - Band to extract

Optional

  • n - Number of bands to extract. Default: 1

eye(width, height, optional \\ [])

@spec eye(integer(), integer(), factor: float(), uchar: boolean()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Make an image showing the eye's spatial response

Arguments

  • width - Image width in pixels
  • height - Image height in pixels

Optional

  • factor - Maximum spatial frequency. Default: 0.5
  • uchar - Output an unsigned char image. Default: false

eye!(width, height, optional \\ [])

@spec eye!(integer(), integer(), factor: float(), uchar: boolean()) ::
  Vix.Vips.Image.t() | no_return()

Make an image showing the eye's spatial response

Arguments

  • width - Image width in pixels
  • height - Image height in pixels

Optional

  • factor - Maximum spatial frequency. Default: 0.5
  • uchar - Output an unsigned char image. Default: false

falsecolour(input)

@spec falsecolour(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

False-color an image

Arguments

  • input - Input image

falsecolour!(input)

@spec falsecolour!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

False-color an image

Arguments

  • input - Input image

fastcor(input, ref)

@spec fastcor(Vix.Vips.Image.t(), Vix.Vips.Image.t()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Fast correlation

Arguments

  • input - Input image argument
  • ref - Input reference image

fastcor!(input, ref)

Fast correlation

Arguments

  • input - Input image argument
  • ref - Input reference image

fill_nearest(input)

@spec fill_nearest(Vix.Vips.Image.t()) ::
  {:ok, {Vix.Vips.Image.t(), %{distance: Vix.Vips.Image.t()}}}
  | {:error, term()}

Fill image zeros with nearest non-zero pixel

Arguments

  • input - Input image argument

Returns

Operation returns a tuple

  • out - Value of nearest non-zero pixel. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • distance - Distance to nearest non-zero pixel. (Vix.Vips.Image.t())

fill_nearest!(input)

@spec fill_nearest!(Vix.Vips.Image.t()) ::
  {Vix.Vips.Image.t(), %{distance: Vix.Vips.Image.t()}} | no_return()

Fill image zeros with nearest non-zero pixel

Arguments

  • input - Input image argument

Returns

Operation returns a tuple

  • out - Value of nearest non-zero pixel. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • distance - Distance to nearest non-zero pixel. (Vix.Vips.Image.t())

find_trim(input, optional \\ [])

@spec find_trim(Vix.Vips.Image.t(),
  "line-art": boolean(),
  background: [float()],
  threshold: float()
) ::
  {:ok, {integer(), integer(), integer(), integer()}} | {:error, term()}

Search an image for non-edge areas

Arguments

  • input - Image to find_trim

Optional

  • line-art - Enable line art mode. Default: false
  • background - Color for background pixels. Default: nil
  • threshold - Object threshold. Default: 10.0

Returns

Operation returns a tuple

  • left - Left edge of image. (integer())
  • top - Top edge of extract area. (integer())
  • width - Width of extract area. (integer())
  • height - Height of extract area. (integer())

find_trim!(input, optional \\ [])

@spec find_trim!(Vix.Vips.Image.t(),
  "line-art": boolean(),
  background: [float()],
  threshold: float()
) ::
  {integer(), integer(), integer(), integer()} | no_return()

Search an image for non-edge areas

Arguments

  • input - Image to find_trim

Optional

  • line-art - Enable line art mode. Default: false
  • background - Color for background pixels. Default: nil
  • threshold - Object threshold. Default: 10.0

Returns

Operation returns a tuple

  • left - Left edge of image. (integer())
  • top - Top edge of extract area. (integer())
  • width - Width of extract area. (integer())
  • height - Height of extract area. (integer())

flatten(input, optional \\ [])

@spec flatten(Vix.Vips.Image.t(), "max-alpha": float(), background: [float()]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Flatten alpha out of an image

Arguments

  • input - Input image

Optional

  • max-alpha - Maximum value of alpha channel. Default: 255.0
  • background - Background value. Default: nil

flatten!(input, optional \\ [])

@spec flatten!(Vix.Vips.Image.t(), "max-alpha": float(), background: [float()]) ::
  Vix.Vips.Image.t() | no_return()

Flatten alpha out of an image

Arguments

  • input - Input image

Optional

  • max-alpha - Maximum value of alpha channel. Default: 255.0
  • background - Background value. Default: nil

flip(input, direction)

@spec flip(Vix.Vips.Image.t(), vips_direction()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Flip an image

Arguments

  • input - Input image
  • direction - Direction to flip image

flip!(input, direction)

Flip an image

Arguments

  • input - Input image
  • direction - Direction to flip image

float2rad(input)

@spec float2rad(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Transform float rgb to radiance coding

Arguments

  • input - Input image

float2rad!(input)

@spec float2rad!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Transform float rgb to radiance coding

Arguments

  • input - Input image

fractsurf(width, height, fractal-dimension)

@spec fractsurf(integer(), integer(), float()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Make a fractal surface

Arguments

  • width - Image width in pixels
  • height - Image height in pixels
  • fractal-dimension - Fractal dimension

fractsurf!(width, height, fractal-dimension)

@spec fractsurf!(integer(), integer(), float()) :: Vix.Vips.Image.t() | no_return()

Make a fractal surface

Arguments

  • width - Image width in pixels
  • height - Image height in pixels
  • fractal-dimension - Fractal dimension

freqmult(input, mask)

@spec freqmult(Vix.Vips.Image.t(), Vix.Vips.Image.t()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Frequency-domain filtering

Arguments

  • input - Input image
  • mask - Input mask image

freqmult!(input, mask)

Frequency-domain filtering

Arguments

  • input - Input image
  • mask - Input mask image

gamma(input, optional \\ [])

@spec gamma(Vix.Vips.Image.t(), [{:exponent, float()}]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Gamma an image

Arguments

  • input - Input image

Optional

  • exponent - Gamma factor. Default: 2.4

gamma!(input, optional \\ [])

@spec gamma!(Vix.Vips.Image.t(), [{:exponent, float()}]) ::
  Vix.Vips.Image.t() | no_return()

Gamma an image

Arguments

  • input - Input image

Optional

  • exponent - Gamma factor. Default: 2.4

gaussblur(input, sigma, optional \\ [])

@spec gaussblur(Vix.Vips.Image.t(), float(),
  precision: vips_precision(),
  "min-ampl": float()
) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Gaussian blur

Arguments

  • input - Input image
  • sigma - Sigma of Gaussian

Optional

  • precision - Convolve with this precision. Default: :VIPS_PRECISION_INTEGER
  • min-ampl - Minimum amplitude of Gaussian. Default: 0.2

gaussblur!(input, sigma, optional \\ [])

@spec gaussblur!(Vix.Vips.Image.t(), float(),
  precision: vips_precision(),
  "min-ampl": float()
) ::
  Vix.Vips.Image.t() | no_return()

Gaussian blur

Arguments

  • input - Input image
  • sigma - Sigma of Gaussian

Optional

  • precision - Convolve with this precision. Default: :VIPS_PRECISION_INTEGER
  • min-ampl - Minimum amplitude of Gaussian. Default: 0.2

gaussmat(sigma, min-ampl, optional \\ [])

@spec gaussmat(float(), float(),
  precision: vips_precision(),
  integer: boolean(),
  separable: boolean()
) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Make a gaussian image

Arguments

  • sigma - Sigma of Gaussian
  • min-ampl - Minimum amplitude of Gaussian

Optional

  • precision - Generate with this precision. Default: :VIPS_PRECISION_INTEGER
  • integer - Generate integer Gaussian. Default: false
  • separable - Generate separable Gaussian. Default: false

gaussmat!(sigma, min-ampl, optional \\ [])

@spec gaussmat!(float(), float(),
  precision: vips_precision(),
  integer: boolean(),
  separable: boolean()
) ::
  Vix.Vips.Image.t() | no_return()

Make a gaussian image

Arguments

  • sigma - Sigma of Gaussian
  • min-ampl - Minimum amplitude of Gaussian

Optional

  • precision - Generate with this precision. Default: :VIPS_PRECISION_INTEGER
  • integer - Generate integer Gaussian. Default: false
  • separable - Generate separable Gaussian. Default: false

gaussnoise(width, height, optional \\ [])

@spec gaussnoise(integer(), integer(), seed: integer(), mean: float(), sigma: float()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Make a gaussnoise image

Arguments

  • width - Image width in pixels
  • height - Image height in pixels

Optional

  • seed - Random number seed. Default: 0
  • mean - Mean of pixels in generated image. Default: 128.0
  • sigma - Standard deviation of pixels in generated image. Default: 30.0

gaussnoise!(width, height, optional \\ [])

@spec gaussnoise!(integer(), integer(),
  seed: integer(),
  mean: float(),
  sigma: float()
) ::
  Vix.Vips.Image.t() | no_return()

Make a gaussnoise image

Arguments

  • width - Image width in pixels
  • height - Image height in pixels

Optional

  • seed - Random number seed. Default: 0
  • mean - Mean of pixels in generated image. Default: 128.0
  • sigma - Standard deviation of pixels in generated image. Default: 30.0

getpoint(input, x, y)

@spec getpoint(Vix.Vips.Image.t(), integer(), integer()) ::
  {:ok, [float()]} | {:error, term()}

Read a point from an image

Arguments

  • input - Input image
  • x - Point to read
  • y - Point to read

getpoint!(input, x, y)

@spec getpoint!(Vix.Vips.Image.t(), integer(), integer()) :: [float()] | no_return()

Read a point from an image

Arguments

  • input - Input image
  • x - Point to read
  • y - Point to read

gifload(filename, optional \\ [])

@spec gifload(String.t(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  page: integer(),
  n: integer()
) ::
  {:ok, {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}}} | {:error, term()}

Load gif with libnsgif

Arguments

  • filename - Filename to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • page - First page to load. Default: 0
  • n - Number of pages to load, -1 for all. Default: 1

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

gifload!(filename, optional \\ [])

@spec gifload!(String.t(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  page: integer(),
  n: integer()
) :: {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}} | no_return()

Load gif with libnsgif

Arguments

  • filename - Filename to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • page - First page to load. Default: 0
  • n - Number of pages to load, -1 for all. Default: 1

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

gifload_buffer(buffer, optional \\ [])

@spec gifload_buffer(binary(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  page: integer(),
  n: integer()
) ::
  {:ok, {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}}} | {:error, term()}

Load gif with libnsgif

Arguments

  • buffer - Buffer to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • page - First page to load. Default: 0
  • n - Number of pages to load, -1 for all. Default: 1

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

gifload_buffer!(buffer, optional \\ [])

@spec gifload_buffer!(binary(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  page: integer(),
  n: integer()
) :: {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}} | no_return()

Load gif with libnsgif

Arguments

  • buffer - Buffer to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • page - First page to load. Default: 0
  • n - Number of pages to load, -1 for all. Default: 1

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

gifsave(input, filename, optional \\ [])

@spec gifsave(Vix.Vips.Image.t(), String.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  reoptimise: boolean(),
  interlace: boolean(),
  "interpalette-maxerror": float(),
  reuse: boolean(),
  "interframe-maxerror": float(),
  bitdepth: integer(),
  effort: integer(),
  dither: float()
) :: :ok | {:error, term()}

Save as gif

Arguments

  • input - Image to save
  • filename - Filename to save to

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • reoptimise - Reoptimise colour palettes. Default: false
  • interlace - Generate an interlaced (progressive) GIF. Default: false
  • interpalette-maxerror - Maximum inter-palette error for palette reusage. Default: 3.0
  • reuse - Reuse palette from input. Default: false
  • interframe-maxerror - Maximum inter-frame error for transparency. Default: 0.0
  • bitdepth - Number of bits per pixel. Default: 8
  • effort - Quantisation effort. Default: 7
  • dither - Amount of dithering. Default: 1.0

gifsave!(input, filename, optional \\ [])

@spec gifsave!(Vix.Vips.Image.t(), String.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  reoptimise: boolean(),
  interlace: boolean(),
  "interpalette-maxerror": float(),
  reuse: boolean(),
  "interframe-maxerror": float(),
  bitdepth: integer(),
  effort: integer(),
  dither: float()
) :: :ok | no_return()

Save as gif

Arguments

  • input - Image to save
  • filename - Filename to save to

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • reoptimise - Reoptimise colour palettes. Default: false
  • interlace - Generate an interlaced (progressive) GIF. Default: false
  • interpalette-maxerror - Maximum inter-palette error for palette reusage. Default: 3.0
  • reuse - Reuse palette from input. Default: false
  • interframe-maxerror - Maximum inter-frame error for transparency. Default: 0.0
  • bitdepth - Number of bits per pixel. Default: 8
  • effort - Quantisation effort. Default: 7
  • dither - Amount of dithering. Default: 1.0

gifsave_buffer(input, optional \\ [])

@spec gifsave_buffer(Vix.Vips.Image.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  reoptimise: boolean(),
  interlace: boolean(),
  "interpalette-maxerror": float(),
  reuse: boolean(),
  "interframe-maxerror": float(),
  bitdepth: integer(),
  effort: integer(),
  dither: float()
) :: {:ok, binary()} | {:error, term()}

Save as gif

Arguments

  • input - Image to save

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • reoptimise - Reoptimise colour palettes. Default: false
  • interlace - Generate an interlaced (progressive) GIF. Default: false
  • interpalette-maxerror - Maximum inter-palette error for palette reusage. Default: 3.0
  • reuse - Reuse palette from input. Default: false
  • interframe-maxerror - Maximum inter-frame error for transparency. Default: 0.0
  • bitdepth - Number of bits per pixel. Default: 8
  • effort - Quantisation effort. Default: 7
  • dither - Amount of dithering. Default: 1.0

gifsave_buffer!(input, optional \\ [])

@spec gifsave_buffer!(Vix.Vips.Image.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  reoptimise: boolean(),
  interlace: boolean(),
  "interpalette-maxerror": float(),
  reuse: boolean(),
  "interframe-maxerror": float(),
  bitdepth: integer(),
  effort: integer(),
  dither: float()
) :: binary() | no_return()

Save as gif

Arguments

  • input - Image to save

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • reoptimise - Reoptimise colour palettes. Default: false
  • interlace - Generate an interlaced (progressive) GIF. Default: false
  • interpalette-maxerror - Maximum inter-palette error for palette reusage. Default: 3.0
  • reuse - Reuse palette from input. Default: false
  • interframe-maxerror - Maximum inter-frame error for transparency. Default: 0.0
  • bitdepth - Number of bits per pixel. Default: 8
  • effort - Quantisation effort. Default: 7
  • dither - Amount of dithering. Default: 1.0

globalbalance(input, optional \\ [])

@spec globalbalance(Vix.Vips.Image.t(), "int-output": boolean(), gamma: float()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Global balance an image mosaic

Arguments

  • input - Input image

Optional

  • int-output - Integer output. Default: false
  • gamma - Image gamma. Default: 1.6

globalbalance!(input, optional \\ [])

@spec globalbalance!(Vix.Vips.Image.t(), "int-output": boolean(), gamma: float()) ::
  Vix.Vips.Image.t() | no_return()

Global balance an image mosaic

Arguments

  • input - Input image

Optional

  • int-output - Integer output. Default: false
  • gamma - Image gamma. Default: 1.6

gravity(input, direction, width, height, optional \\ [])

@spec gravity(Vix.Vips.Image.t(), vips_compass_direction(), integer(), integer(),
  background: [float()],
  extend: vips_extend()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Place an image within a larger image with a certain gravity

Arguments

  • input - Input image
  • direction - Direction to place image within width/height
  • width - Image width in pixels
  • height - Image height in pixels

Optional

  • background - Color for background pixels. Default: nil
  • extend - How to generate the extra pixels. Default: :VIPS_EXTEND_BLACK

gravity!(input, direction, width, height, optional \\ [])

@spec gravity!(Vix.Vips.Image.t(), vips_compass_direction(), integer(), integer(),
  background: [float()],
  extend: vips_extend()
) :: Vix.Vips.Image.t() | no_return()

Place an image within a larger image with a certain gravity

Arguments

  • input - Input image
  • direction - Direction to place image within width/height
  • width - Image width in pixels
  • height - Image height in pixels

Optional

  • background - Color for background pixels. Default: nil
  • extend - How to generate the extra pixels. Default: :VIPS_EXTEND_BLACK

grey(width, height, optional \\ [])

@spec grey(integer(), integer(), [{:uchar, boolean()}]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Make a grey ramp image

Arguments

  • width - Image width in pixels
  • height - Image height in pixels

Optional

  • uchar - Output an unsigned char image. Default: false

grey!(width, height, optional \\ [])

@spec grey!(integer(), integer(), [{:uchar, boolean()}]) ::
  Vix.Vips.Image.t() | no_return()

Make a grey ramp image

Arguments

  • width - Image width in pixels
  • height - Image height in pixels

Optional

  • uchar - Output an unsigned char image. Default: false

grid(input, tile-height, across, down)

@spec grid(Vix.Vips.Image.t(), integer(), integer(), integer()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Grid an image

Arguments

  • input - Input image
  • tile-height - Chop into tiles this high
  • across - Number of tiles across
  • down - Number of tiles down

grid!(input, tile-height, across, down)

Grid an image

Arguments

  • input - Input image
  • tile-height - Chop into tiles this high
  • across - Number of tiles across
  • down - Number of tiles down

heifload(filename, optional \\ [])

@spec heifload(String.t(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  unlimited: boolean(),
  autorotate: boolean(),
  thumbnail: boolean(),
  n: integer(),
  page: integer()
) ::
  {:ok, {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}}} | {:error, term()}

Load a heif image

Arguments

  • filename - Filename to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • unlimited - Remove all denial of service limits. Default: false
  • autorotate - Rotate image using exif orientation. Default: false
  • thumbnail - Fetch thumbnail image. Default: false
  • n - Number of pages to load, -1 for all. Default: 1
  • page - First page to load. Default: 0

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

heifload!(filename, optional \\ [])

@spec heifload!(String.t(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  unlimited: boolean(),
  autorotate: boolean(),
  thumbnail: boolean(),
  n: integer(),
  page: integer()
) :: {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}} | no_return()

Load a heif image

Arguments

  • filename - Filename to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • unlimited - Remove all denial of service limits. Default: false
  • autorotate - Rotate image using exif orientation. Default: false
  • thumbnail - Fetch thumbnail image. Default: false
  • n - Number of pages to load, -1 for all. Default: 1
  • page - First page to load. Default: 0

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

heifload_buffer(buffer, optional \\ [])

@spec heifload_buffer(binary(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  unlimited: boolean(),
  autorotate: boolean(),
  thumbnail: boolean(),
  n: integer(),
  page: integer()
) ::
  {:ok, {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}}} | {:error, term()}

Load a heif image

Arguments

  • buffer - Buffer to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • unlimited - Remove all denial of service limits. Default: false
  • autorotate - Rotate image using exif orientation. Default: false
  • thumbnail - Fetch thumbnail image. Default: false
  • n - Number of pages to load, -1 for all. Default: 1
  • page - First page to load. Default: 0

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

heifload_buffer!(buffer, optional \\ [])

@spec heifload_buffer!(binary(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  unlimited: boolean(),
  autorotate: boolean(),
  thumbnail: boolean(),
  n: integer(),
  page: integer()
) :: {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}} | no_return()

Load a heif image

Arguments

  • buffer - Buffer to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • unlimited - Remove all denial of service limits. Default: false
  • autorotate - Rotate image using exif orientation. Default: false
  • thumbnail - Fetch thumbnail image. Default: false
  • n - Number of pages to load, -1 for all. Default: 1
  • page - First page to load. Default: 0

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

heifsave(input, filename, optional \\ [])

@spec heifsave(Vix.Vips.Image.t(), String.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  encoder: vips_foreign_heif_encoder(),
  speed: integer(),
  "subsample-mode": vips_foreign_subsample(),
  effort: integer(),
  compression: vips_foreign_heif_compression(),
  lossless: boolean(),
  bitdepth: integer(),
  Q: integer()
) :: :ok | {:error, term()}

Save image in heif format

Arguments

  • input - Image to save
  • filename - Filename to save to

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • encoder - Select encoder to use. Default: :VIPS_FOREIGN_HEIF_ENCODER_AUTO
  • speed - CPU effort. Default: 5
  • subsample-mode - Select chroma subsample operation mode. Default: :VIPS_FOREIGN_SUBSAMPLE_AUTO
  • effort - CPU effort. Default: 4
  • compression - Compression format. Default: :VIPS_FOREIGN_HEIF_COMPRESSION_HEVC
  • lossless - Enable lossless compression. Default: false
  • bitdepth - Number of bits per pixel. Default: 8
  • Q - Q factor. Default: 50

heifsave!(input, filename, optional \\ [])

@spec heifsave!(Vix.Vips.Image.t(), String.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  encoder: vips_foreign_heif_encoder(),
  speed: integer(),
  "subsample-mode": vips_foreign_subsample(),
  effort: integer(),
  compression: vips_foreign_heif_compression(),
  lossless: boolean(),
  bitdepth: integer(),
  Q: integer()
) :: :ok | no_return()

Save image in heif format

Arguments

  • input - Image to save
  • filename - Filename to save to

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • encoder - Select encoder to use. Default: :VIPS_FOREIGN_HEIF_ENCODER_AUTO
  • speed - CPU effort. Default: 5
  • subsample-mode - Select chroma subsample operation mode. Default: :VIPS_FOREIGN_SUBSAMPLE_AUTO
  • effort - CPU effort. Default: 4
  • compression - Compression format. Default: :VIPS_FOREIGN_HEIF_COMPRESSION_HEVC
  • lossless - Enable lossless compression. Default: false
  • bitdepth - Number of bits per pixel. Default: 8
  • Q - Q factor. Default: 50

heifsave_buffer(input, optional \\ [])

@spec heifsave_buffer(Vix.Vips.Image.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  encoder: vips_foreign_heif_encoder(),
  speed: integer(),
  "subsample-mode": vips_foreign_subsample(),
  effort: integer(),
  compression: vips_foreign_heif_compression(),
  lossless: boolean(),
  bitdepth: integer(),
  Q: integer()
) :: {:ok, binary()} | {:error, term()}

Save image in heif format

Arguments

  • input - Image to save

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • encoder - Select encoder to use. Default: :VIPS_FOREIGN_HEIF_ENCODER_AUTO
  • speed - CPU effort. Default: 5
  • subsample-mode - Select chroma subsample operation mode. Default: :VIPS_FOREIGN_SUBSAMPLE_AUTO
  • effort - CPU effort. Default: 4
  • compression - Compression format. Default: :VIPS_FOREIGN_HEIF_COMPRESSION_HEVC
  • lossless - Enable lossless compression. Default: false
  • bitdepth - Number of bits per pixel. Default: 8
  • Q - Q factor. Default: 50

heifsave_buffer!(input, optional \\ [])

@spec heifsave_buffer!(Vix.Vips.Image.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  encoder: vips_foreign_heif_encoder(),
  speed: integer(),
  "subsample-mode": vips_foreign_subsample(),
  effort: integer(),
  compression: vips_foreign_heif_compression(),
  lossless: boolean(),
  bitdepth: integer(),
  Q: integer()
) :: binary() | no_return()

Save image in heif format

Arguments

  • input - Image to save

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • encoder - Select encoder to use. Default: :VIPS_FOREIGN_HEIF_ENCODER_AUTO
  • speed - CPU effort. Default: 5
  • subsample-mode - Select chroma subsample operation mode. Default: :VIPS_FOREIGN_SUBSAMPLE_AUTO
  • effort - CPU effort. Default: 4
  • compression - Compression format. Default: :VIPS_FOREIGN_HEIF_COMPRESSION_HEVC
  • lossless - Enable lossless compression. Default: false
  • bitdepth - Number of bits per pixel. Default: 8
  • Q - Q factor. Default: 50

hist_cum(input)

@spec hist_cum(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Form cumulative histogram

Arguments

  • input - Input image

hist_cum!(input)

@spec hist_cum!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Form cumulative histogram

Arguments

  • input - Input image

hist_entropy(input)

@spec hist_entropy(Vix.Vips.Image.t()) :: {:ok, float()} | {:error, term()}

Estimate image entropy

Arguments

  • input - Input histogram image

hist_entropy!(input)

@spec hist_entropy!(Vix.Vips.Image.t()) :: float() | no_return()

Estimate image entropy

Arguments

  • input - Input histogram image

hist_equal(input, optional \\ [])

@spec hist_equal(Vix.Vips.Image.t(), [{:band, integer()}]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Histogram equalisation

Arguments

  • input - Input image

Optional

  • band - Equalise with this band. Default: -1

hist_equal!(input, optional \\ [])

@spec hist_equal!(Vix.Vips.Image.t(), [{:band, integer()}]) ::
  Vix.Vips.Image.t() | no_return()

Histogram equalisation

Arguments

  • input - Input image

Optional

  • band - Equalise with this band. Default: -1

hist_find(input, optional \\ [])

@spec hist_find(Vix.Vips.Image.t(), [{:band, integer()}]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Find image histogram

Arguments

  • input - Input image

Optional

  • band - Find histogram of band. Default: -1

hist_find!(input, optional \\ [])

@spec hist_find!(Vix.Vips.Image.t(), [{:band, integer()}]) ::
  Vix.Vips.Image.t() | no_return()

Find image histogram

Arguments

  • input - Input image

Optional

  • band - Find histogram of band. Default: -1

hist_find_indexed(input, index, optional \\ [])

@spec hist_find_indexed(Vix.Vips.Image.t(), Vix.Vips.Image.t(), [
  {:combine, vips_combine()}
]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Find indexed image histogram

Arguments

  • input - Input image
  • index - Index image

Optional

  • combine - Combine bins like this. Default: :VIPS_COMBINE_SUM

hist_find_indexed!(input, index, optional \\ [])

@spec hist_find_indexed!(Vix.Vips.Image.t(), Vix.Vips.Image.t(), [
  {:combine, vips_combine()}
]) ::
  Vix.Vips.Image.t() | no_return()

Find indexed image histogram

Arguments

  • input - Input image
  • index - Index image

Optional

  • combine - Combine bins like this. Default: :VIPS_COMBINE_SUM

hist_find_ndim(input, optional \\ [])

@spec hist_find_ndim(Vix.Vips.Image.t(), [{:bins, integer()}]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Find n-dimensional image histogram

Arguments

  • input - Input image

Optional

  • bins - Number of bins in each dimension. Default: 10

hist_find_ndim!(input, optional \\ [])

@spec hist_find_ndim!(Vix.Vips.Image.t(), [{:bins, integer()}]) ::
  Vix.Vips.Image.t() | no_return()

Find n-dimensional image histogram

Arguments

  • input - Input image

Optional

  • bins - Number of bins in each dimension. Default: 10

hist_ismonotonic(input)

@spec hist_ismonotonic(Vix.Vips.Image.t()) :: {:ok, boolean()} | {:error, term()}

Test for monotonicity

Arguments

  • input - Input histogram image

hist_ismonotonic!(input)

@spec hist_ismonotonic!(Vix.Vips.Image.t()) :: boolean() | no_return()

Test for monotonicity

Arguments

  • input - Input histogram image

hist_local(input, width, height, optional \\ [])

@spec hist_local(Vix.Vips.Image.t(), integer(), integer(), [{:"max-slope", integer()}]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Local histogram equalisation

Arguments

  • input - Input image
  • width - Window width in pixels
  • height - Window height in pixels

Optional

  • max-slope - Maximum slope (CLAHE). Default: 0

hist_local!(input, width, height, optional \\ [])

@spec hist_local!(Vix.Vips.Image.t(), integer(), integer(), [
  {:"max-slope", integer()}
]) ::
  Vix.Vips.Image.t() | no_return()

Local histogram equalisation

Arguments

  • input - Input image
  • width - Window width in pixels
  • height - Window height in pixels

Optional

  • max-slope - Maximum slope (CLAHE). Default: 0

hist_match(input, ref)

@spec hist_match(Vix.Vips.Image.t(), Vix.Vips.Image.t()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Match two histograms

Arguments

  • input - Input histogram
  • ref - Reference histogram

hist_match!(input, ref)

@spec hist_match!(Vix.Vips.Image.t(), Vix.Vips.Image.t()) ::
  Vix.Vips.Image.t() | no_return()

Match two histograms

Arguments

  • input - Input histogram
  • ref - Reference histogram

hist_norm(input)

@spec hist_norm(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Normalise histogram

Arguments

  • input - Input image

hist_norm!(input)

@spec hist_norm!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Normalise histogram

Arguments

  • input - Input image

hist_plot(input)

@spec hist_plot(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Plot histogram

Arguments

  • input - Input image

hist_plot!(input)

@spec hist_plot!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Plot histogram

Arguments

  • input - Input image

hough_circle(input, optional \\ [])

@spec hough_circle(Vix.Vips.Image.t(),
  "max-radius": integer(),
  "min-radius": integer(),
  scale: integer()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Find hough circle transform

Arguments

  • input - Input image

Optional

  • max-radius - Largest radius to search for. Default: 20
  • min-radius - Smallest radius to search for. Default: 10
  • scale - Scale down dimensions by this factor. Default: 3

hough_circle!(input, optional \\ [])

@spec hough_circle!(Vix.Vips.Image.t(),
  "max-radius": integer(),
  "min-radius": integer(),
  scale: integer()
) :: Vix.Vips.Image.t() | no_return()

Find hough circle transform

Arguments

  • input - Input image

Optional

  • max-radius - Largest radius to search for. Default: 20
  • min-radius - Smallest radius to search for. Default: 10
  • scale - Scale down dimensions by this factor. Default: 3

hough_line(input, optional \\ [])

@spec hough_line(Vix.Vips.Image.t(), height: integer(), width: integer()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Find hough line transform

Arguments

  • input - Input image

Optional

  • height - Vertical size of parameter space. Default: 256
  • width - Horizontal size of parameter space. Default: 256

hough_line!(input, optional \\ [])

@spec hough_line!(Vix.Vips.Image.t(), height: integer(), width: integer()) ::
  Vix.Vips.Image.t() | no_return()

Find hough line transform

Arguments

  • input - Input image

Optional

  • height - Vertical size of parameter space. Default: 256
  • width - Horizontal size of parameter space. Default: 256

hsv2srgb(input)

@spec hsv2srgb(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Transform hsv to srgb

Arguments

  • input - Input image

hsv2srgb!(input)

@spec hsv2srgb!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Transform hsv to srgb

Arguments

  • input - Input image

icc_export(input, optional \\ [])

@spec icc_export(Vix.Vips.Image.t(),
  depth: integer(),
  "output-profile": String.t(),
  "black-point-compensation": boolean(),
  intent: vips_intent(),
  pcs: vips_pcs()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Output to device with icc profile

Arguments

  • input - Input image

Optional

  • depth - Output device space depth in bits. Default: 8
  • output-profile - Filename to load output profile from. Default: nil
  • black-point-compensation - Enable black point compensation. Default: false
  • intent - Rendering intent. Default: :VIPS_INTENT_RELATIVE
  • pcs - Set Profile Connection Space. Default: :VIPS_PCS_LAB

icc_export!(input, optional \\ [])

@spec icc_export!(Vix.Vips.Image.t(),
  depth: integer(),
  "output-profile": String.t(),
  "black-point-compensation": boolean(),
  intent: vips_intent(),
  pcs: vips_pcs()
) :: Vix.Vips.Image.t() | no_return()

Output to device with icc profile

Arguments

  • input - Input image

Optional

  • depth - Output device space depth in bits. Default: 8
  • output-profile - Filename to load output profile from. Default: nil
  • black-point-compensation - Enable black point compensation. Default: false
  • intent - Rendering intent. Default: :VIPS_INTENT_RELATIVE
  • pcs - Set Profile Connection Space. Default: :VIPS_PCS_LAB

icc_import(input, optional \\ [])

@spec icc_import(Vix.Vips.Image.t(),
  "input-profile": String.t(),
  embedded: boolean(),
  "black-point-compensation": boolean(),
  intent: vips_intent(),
  pcs: vips_pcs()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Import from device with icc profile

Arguments

  • input - Input image

Optional

  • input-profile - Filename to load input profile from. Default: nil
  • embedded - Use embedded input profile, if available. Default: false
  • black-point-compensation - Enable black point compensation. Default: false
  • intent - Rendering intent. Default: :VIPS_INTENT_RELATIVE
  • pcs - Set Profile Connection Space. Default: :VIPS_PCS_LAB

icc_import!(input, optional \\ [])

@spec icc_import!(Vix.Vips.Image.t(),
  "input-profile": String.t(),
  embedded: boolean(),
  "black-point-compensation": boolean(),
  intent: vips_intent(),
  pcs: vips_pcs()
) :: Vix.Vips.Image.t() | no_return()

Import from device with icc profile

Arguments

  • input - Input image

Optional

  • input-profile - Filename to load input profile from. Default: nil
  • embedded - Use embedded input profile, if available. Default: false
  • black-point-compensation - Enable black point compensation. Default: false
  • intent - Rendering intent. Default: :VIPS_INTENT_RELATIVE
  • pcs - Set Profile Connection Space. Default: :VIPS_PCS_LAB

icc_transform(input, output-profile, optional \\ [])

@spec icc_transform(Vix.Vips.Image.t(), String.t(),
  depth: integer(),
  "input-profile": String.t(),
  embedded: boolean(),
  "black-point-compensation": boolean(),
  intent: vips_intent(),
  pcs: vips_pcs()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Transform between devices with icc profiles

Arguments

  • input - Input image
  • output-profile - Filename to load output profile from

Optional

  • depth - Output device space depth in bits. Default: 8
  • input-profile - Filename to load input profile from. Default: nil
  • embedded - Use embedded input profile, if available. Default: false
  • black-point-compensation - Enable black point compensation. Default: false
  • intent - Rendering intent. Default: :VIPS_INTENT_RELATIVE
  • pcs - Set Profile Connection Space. Default: :VIPS_PCS_LAB

icc_transform!(input, output-profile, optional \\ [])

@spec icc_transform!(Vix.Vips.Image.t(), String.t(),
  depth: integer(),
  "input-profile": String.t(),
  embedded: boolean(),
  "black-point-compensation": boolean(),
  intent: vips_intent(),
  pcs: vips_pcs()
) :: Vix.Vips.Image.t() | no_return()

Transform between devices with icc profiles

Arguments

  • input - Input image
  • output-profile - Filename to load output profile from

Optional

  • depth - Output device space depth in bits. Default: 8
  • input-profile - Filename to load input profile from. Default: nil
  • embedded - Use embedded input profile, if available. Default: false
  • black-point-compensation - Enable black point compensation. Default: false
  • intent - Rendering intent. Default: :VIPS_INTENT_RELATIVE
  • pcs - Set Profile Connection Space. Default: :VIPS_PCS_LAB

identity(optional \\ [])

@spec identity(size: integer(), ushort: boolean(), bands: integer()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Make a 1d image where pixel values are indexes

Arguments

Optional

  • size - Size of 16-bit LUT. Default: 65536
  • ushort - Create a 16-bit LUT. Default: false
  • bands - Number of bands in LUT. Default: 1

identity!(optional \\ [])

@spec identity!(size: integer(), ushort: boolean(), bands: integer()) ::
  Vix.Vips.Image.t() | no_return()

Make a 1d image where pixel values are indexes

Arguments

Optional

  • size - Size of 16-bit LUT. Default: 65536
  • ushort - Create a 16-bit LUT. Default: false
  • bands - Number of bands in LUT. Default: 1

ifthenelse(cond, in1, in2, optional \\ [])

@spec ifthenelse(Vix.Vips.Image.t(), Vix.Vips.Image.t(), Vix.Vips.Image.t(), [
  {:blend, boolean()}
]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Ifthenelse an image

Arguments

  • cond - Condition input image
  • in1 - Source for TRUE pixels
  • in2 - Source for FALSE pixels

Optional

  • blend - Blend smoothly between then and else parts. Default: false

ifthenelse!(cond, in1, in2, optional \\ [])

@spec ifthenelse!(Vix.Vips.Image.t(), Vix.Vips.Image.t(), Vix.Vips.Image.t(), [
  {:blend, boolean()}
]) ::
  Vix.Vips.Image.t() | no_return()

Ifthenelse an image

Arguments

  • cond - Condition input image
  • in1 - Source for TRUE pixels
  • in2 - Source for FALSE pixels

Optional

  • blend - Blend smoothly between then and else parts. Default: false

insert(main, sub, x, y, optional \\ [])

@spec insert(Vix.Vips.Image.t(), Vix.Vips.Image.t(), integer(), integer(),
  background: [float()],
  expand: boolean()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

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

Arguments

  • main - Main input image
  • sub - Sub-image to insert into main image
  • x - Left edge of sub in main
  • y - Top edge of sub in main

Optional

  • background - Color for new pixels. Default: nil
  • expand - Expand output to hold all of both inputs. Default: false

insert!(main, sub, x, y, optional \\ [])

@spec insert!(Vix.Vips.Image.t(), Vix.Vips.Image.t(), integer(), integer(),
  background: [float()],
  expand: boolean()
) :: Vix.Vips.Image.t() | no_return()

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

Arguments

  • main - Main input image
  • sub - Sub-image to insert into main image
  • x - Left edge of sub in main
  • y - Top edge of sub in main

Optional

  • background - Color for new pixels. Default: nil
  • expand - Expand output to hold all of both inputs. Default: false

invert(input)

@spec invert(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Invert an image

Arguments

  • input - Input image

invert!(input)

@spec invert!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Invert an image

Arguments

  • input - Input image

invertlut(input, optional \\ [])

@spec invertlut(Vix.Vips.Image.t(), [{:size, integer()}]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Build an inverted look-up table

Arguments

  • input - Matrix of XY coordinates

Optional

  • size - LUT size to generate. Default: 256

invertlut!(input, optional \\ [])

@spec invertlut!(Vix.Vips.Image.t(), [{:size, integer()}]) ::
  Vix.Vips.Image.t() | no_return()

Build an inverted look-up table

Arguments

  • input - Matrix of XY coordinates

Optional

  • size - LUT size to generate. Default: 256

join(in1, in2, direction, optional \\ [])

@spec join(Vix.Vips.Image.t(), Vix.Vips.Image.t(), vips_direction(),
  align: vips_align(),
  background: [float()],
  shim: integer(),
  expand: boolean()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Join a pair of images

Arguments

  • in1 - First input image
  • in2 - Second input image
  • direction - Join left-right or up-down

Optional

  • align - Align on the low, centre or high coordinate edge. Default: :VIPS_ALIGN_LOW
  • background - Colour for new pixels. Default: nil
  • shim - Pixels between images. Default: 0
  • expand - Expand output to hold all of both inputs. Default: false

join!(in1, in2, direction, optional \\ [])

@spec join!(Vix.Vips.Image.t(), Vix.Vips.Image.t(), vips_direction(),
  align: vips_align(),
  background: [float()],
  shim: integer(),
  expand: boolean()
) :: Vix.Vips.Image.t() | no_return()

Join a pair of images

Arguments

  • in1 - First input image
  • in2 - Second input image
  • direction - Join left-right or up-down

Optional

  • align - Align on the low, centre or high coordinate edge. Default: :VIPS_ALIGN_LOW
  • background - Colour for new pixels. Default: nil
  • shim - Pixels between images. Default: 0
  • expand - Expand output to hold all of both inputs. Default: false

jpegload(filename, optional \\ [])

@spec jpegload(String.t(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  unlimited: boolean(),
  autorotate: boolean(),
  shrink: integer()
) ::
  {:ok, {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}}} | {:error, term()}

Load jpeg from file

Arguments

  • filename - Filename to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • unlimited - Remove all denial of service limits. Default: false
  • autorotate - Rotate image using exif orientation. Default: false
  • shrink - Shrink factor on load. Default: 1

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

jpegload!(filename, optional \\ [])

@spec jpegload!(String.t(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  unlimited: boolean(),
  autorotate: boolean(),
  shrink: integer()
) :: {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}} | no_return()

Load jpeg from file

Arguments

  • filename - Filename to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • unlimited - Remove all denial of service limits. Default: false
  • autorotate - Rotate image using exif orientation. Default: false
  • shrink - Shrink factor on load. Default: 1

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

jpegload_buffer(buffer, optional \\ [])

@spec jpegload_buffer(binary(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  unlimited: boolean(),
  autorotate: boolean(),
  shrink: integer()
) ::
  {:ok, {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}}} | {:error, term()}

Load jpeg from buffer

Arguments

  • buffer - Buffer to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • unlimited - Remove all denial of service limits. Default: false
  • autorotate - Rotate image using exif orientation. Default: false
  • shrink - Shrink factor on load. Default: 1

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

jpegload_buffer!(buffer, optional \\ [])

@spec jpegload_buffer!(binary(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  unlimited: boolean(),
  autorotate: boolean(),
  shrink: integer()
) :: {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}} | no_return()

Load jpeg from buffer

Arguments

  • buffer - Buffer to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • unlimited - Remove all denial of service limits. Default: false
  • autorotate - Rotate image using exif orientation. Default: false
  • shrink - Shrink factor on load. Default: 1

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

jpegsave(input, filename, optional \\ [])

@spec jpegsave(Vix.Vips.Image.t(), String.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  "restart-interval": integer(),
  "subsample-mode": vips_foreign_subsample(),
  "quant-table": integer(),
  "optimize-scans": boolean(),
  "overshoot-deringing": boolean(),
  "trellis-quant": boolean(),
  "no-subsample": boolean(),
  interlace: boolean(),
  "optimize-coding": boolean(),
  Q: integer()
) :: :ok | {:error, term()}

Save image to jpeg file

Arguments

  • input - Image to save
  • filename - Filename to save to

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • restart-interval - Add restart markers every specified number of mcu. Default: 0
  • subsample-mode - Select chroma subsample operation mode. Default: :VIPS_FOREIGN_SUBSAMPLE_AUTO
  • quant-table - Use predefined quantization table with given index. Default: 0
  • optimize-scans - Split spectrum of DCT coefficients into separate scans. Default: false
  • overshoot-deringing - Apply overshooting to samples with extreme values. Default: false
  • trellis-quant - Apply trellis quantisation to each 8x8 block. Default: false
  • no-subsample - Disable chroma subsample. Default: false
  • interlace - Generate an interlaced (progressive) jpeg. Default: false
  • optimize-coding - Compute optimal Huffman coding tables. Default: false
  • Q - Q factor. Default: 75

jpegsave!(input, filename, optional \\ [])

@spec jpegsave!(Vix.Vips.Image.t(), String.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  "restart-interval": integer(),
  "subsample-mode": vips_foreign_subsample(),
  "quant-table": integer(),
  "optimize-scans": boolean(),
  "overshoot-deringing": boolean(),
  "trellis-quant": boolean(),
  "no-subsample": boolean(),
  interlace: boolean(),
  "optimize-coding": boolean(),
  Q: integer()
) :: :ok | no_return()

Save image to jpeg file

Arguments

  • input - Image to save
  • filename - Filename to save to

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • restart-interval - Add restart markers every specified number of mcu. Default: 0
  • subsample-mode - Select chroma subsample operation mode. Default: :VIPS_FOREIGN_SUBSAMPLE_AUTO
  • quant-table - Use predefined quantization table with given index. Default: 0
  • optimize-scans - Split spectrum of DCT coefficients into separate scans. Default: false
  • overshoot-deringing - Apply overshooting to samples with extreme values. Default: false
  • trellis-quant - Apply trellis quantisation to each 8x8 block. Default: false
  • no-subsample - Disable chroma subsample. Default: false
  • interlace - Generate an interlaced (progressive) jpeg. Default: false
  • optimize-coding - Compute optimal Huffman coding tables. Default: false
  • Q - Q factor. Default: 75

jpegsave_buffer(input, optional \\ [])

@spec jpegsave_buffer(Vix.Vips.Image.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  "restart-interval": integer(),
  "subsample-mode": vips_foreign_subsample(),
  "quant-table": integer(),
  "optimize-scans": boolean(),
  "overshoot-deringing": boolean(),
  "trellis-quant": boolean(),
  "no-subsample": boolean(),
  interlace: boolean(),
  "optimize-coding": boolean(),
  Q: integer()
) :: {:ok, binary()} | {:error, term()}

Save image to jpeg buffer

Arguments

  • input - Image to save

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • restart-interval - Add restart markers every specified number of mcu. Default: 0
  • subsample-mode - Select chroma subsample operation mode. Default: :VIPS_FOREIGN_SUBSAMPLE_AUTO
  • quant-table - Use predefined quantization table with given index. Default: 0
  • optimize-scans - Split spectrum of DCT coefficients into separate scans. Default: false
  • overshoot-deringing - Apply overshooting to samples with extreme values. Default: false
  • trellis-quant - Apply trellis quantisation to each 8x8 block. Default: false
  • no-subsample - Disable chroma subsample. Default: false
  • interlace - Generate an interlaced (progressive) jpeg. Default: false
  • optimize-coding - Compute optimal Huffman coding tables. Default: false
  • Q - Q factor. Default: 75

jpegsave_buffer!(input, optional \\ [])

@spec jpegsave_buffer!(Vix.Vips.Image.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  "restart-interval": integer(),
  "subsample-mode": vips_foreign_subsample(),
  "quant-table": integer(),
  "optimize-scans": boolean(),
  "overshoot-deringing": boolean(),
  "trellis-quant": boolean(),
  "no-subsample": boolean(),
  interlace: boolean(),
  "optimize-coding": boolean(),
  Q: integer()
) :: binary() | no_return()

Save image to jpeg buffer

Arguments

  • input - Image to save

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • restart-interval - Add restart markers every specified number of mcu. Default: 0
  • subsample-mode - Select chroma subsample operation mode. Default: :VIPS_FOREIGN_SUBSAMPLE_AUTO
  • quant-table - Use predefined quantization table with given index. Default: 0
  • optimize-scans - Split spectrum of DCT coefficients into separate scans. Default: false
  • overshoot-deringing - Apply overshooting to samples with extreme values. Default: false
  • trellis-quant - Apply trellis quantisation to each 8x8 block. Default: false
  • no-subsample - Disable chroma subsample. Default: false
  • interlace - Generate an interlaced (progressive) jpeg. Default: false
  • optimize-coding - Compute optimal Huffman coding tables. Default: false
  • Q - Q factor. Default: 75

jpegsave_mime(input, optional \\ [])

@spec jpegsave_mime(Vix.Vips.Image.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  "restart-interval": integer(),
  "subsample-mode": vips_foreign_subsample(),
  "quant-table": integer(),
  "optimize-scans": boolean(),
  "overshoot-deringing": boolean(),
  "trellis-quant": boolean(),
  "no-subsample": boolean(),
  interlace: boolean(),
  "optimize-coding": boolean(),
  Q: integer()
) :: :ok | {:error, term()}

Save image to jpeg mime

Arguments

  • input - Image to save

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • restart-interval - Add restart markers every specified number of mcu. Default: 0
  • subsample-mode - Select chroma subsample operation mode. Default: :VIPS_FOREIGN_SUBSAMPLE_AUTO
  • quant-table - Use predefined quantization table with given index. Default: 0
  • optimize-scans - Split spectrum of DCT coefficients into separate scans. Default: false
  • overshoot-deringing - Apply overshooting to samples with extreme values. Default: false
  • trellis-quant - Apply trellis quantisation to each 8x8 block. Default: false
  • no-subsample - Disable chroma subsample. Default: false
  • interlace - Generate an interlaced (progressive) jpeg. Default: false
  • optimize-coding - Compute optimal Huffman coding tables. Default: false
  • Q - Q factor. Default: 75

jpegsave_mime!(input, optional \\ [])

@spec jpegsave_mime!(Vix.Vips.Image.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  "restart-interval": integer(),
  "subsample-mode": vips_foreign_subsample(),
  "quant-table": integer(),
  "optimize-scans": boolean(),
  "overshoot-deringing": boolean(),
  "trellis-quant": boolean(),
  "no-subsample": boolean(),
  interlace: boolean(),
  "optimize-coding": boolean(),
  Q: integer()
) :: :ok | no_return()

Save image to jpeg mime

Arguments

  • input - Image to save

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • restart-interval - Add restart markers every specified number of mcu. Default: 0
  • subsample-mode - Select chroma subsample operation mode. Default: :VIPS_FOREIGN_SUBSAMPLE_AUTO
  • quant-table - Use predefined quantization table with given index. Default: 0
  • optimize-scans - Split spectrum of DCT coefficients into separate scans. Default: false
  • overshoot-deringing - Apply overshooting to samples with extreme values. Default: false
  • trellis-quant - Apply trellis quantisation to each 8x8 block. Default: false
  • no-subsample - Disable chroma subsample. Default: false
  • interlace - Generate an interlaced (progressive) jpeg. Default: false
  • optimize-coding - Compute optimal Huffman coding tables. Default: false
  • Q - Q factor. Default: 75

lab2labq(input)

@spec lab2labq(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Transform float lab to labq coding

Arguments

  • input - Input image

lab2labq!(input)

@spec lab2labq!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Transform float lab to labq coding

Arguments

  • input - Input image

lab2labs(input)

@spec lab2labs(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Transform float lab to signed short

Arguments

  • input - Input image

lab2labs!(input)

@spec lab2labs!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Transform float lab to signed short

Arguments

  • input - Input image

lab2lch(input)

@spec lab2lch(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Transform lab to lch

Arguments

  • input - Input image

lab2lch!(input)

@spec lab2lch!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Transform lab to lch

Arguments

  • input - Input image

lab2xyz(input, optional \\ [])

@spec lab2xyz(Vix.Vips.Image.t(), [{:temp, [float()]}]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Transform cielab to xyz

Arguments

  • input - Input image

Optional

  • temp - Color temperature. Default: nil

lab2xyz!(input, optional \\ [])

@spec lab2xyz!(Vix.Vips.Image.t(), [{:temp, [float()]}]) ::
  Vix.Vips.Image.t() | no_return()

Transform cielab to xyz

Arguments

  • input - Input image

Optional

  • temp - Color temperature. Default: nil

labelregions(input)

@spec labelregions(Vix.Vips.Image.t()) ::
  {:ok, {Vix.Vips.Image.t(), %{segments: integer()}}} | {:error, term()}

Label regions in an image

Arguments

  • input - Input image argument

Returns

Operation returns a tuple

  • mask - Mask of region labels. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • segments - Number of discrete contiguous regions. (integer())

labelregions!(input)

@spec labelregions!(Vix.Vips.Image.t()) ::
  {Vix.Vips.Image.t(), %{segments: integer()}} | no_return()

Label regions in an image

Arguments

  • input - Input image argument

Returns

Operation returns a tuple

  • mask - Mask of region labels. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • segments - Number of discrete contiguous regions. (integer())

labq2lab(input)

@spec labq2lab(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Unpack a labq image to float lab

Arguments

  • input - Input image

labq2lab!(input)

@spec labq2lab!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Unpack a labq image to float lab

Arguments

  • input - Input image

labq2labs(input)

@spec labq2labs(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Unpack a labq image to short lab

Arguments

  • input - Input image

labq2labs!(input)

@spec labq2labs!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Unpack a labq image to short lab

Arguments

  • input - Input image

labq2srgb(input)

@spec labq2srgb(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Convert a labq image to srgb

Arguments

  • input - Input image

labq2srgb!(input)

@spec labq2srgb!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Convert a labq image to srgb

Arguments

  • input - Input image

labs2lab(input)

@spec labs2lab(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Transform signed short lab to float

Arguments

  • input - Input image

labs2lab!(input)

@spec labs2lab!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Transform signed short lab to float

Arguments

  • input - Input image

labs2labq(input)

@spec labs2labq(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Transform short lab to labq coding

Arguments

  • input - Input image

labs2labq!(input)

@spec labs2labq!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Transform short lab to labq coding

Arguments

  • input - Input image

lch2cmc(input)

@spec lch2cmc(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Transform lch to cmc

Arguments

  • input - Input image

lch2cmc!(input)

@spec lch2cmc!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Transform lch to cmc

Arguments

  • input - Input image

lch2lab(input)

@spec lch2lab(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Transform lch to lab

Arguments

  • input - Input image

lch2lab!(input)

@spec lch2lab!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Transform lch to lab

Arguments

  • input - Input image

linear(input, a, b, optional \\ [])

@spec linear(Vix.Vips.Image.t(), [float()], [float()], [{:uchar, boolean()}]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Calculate (a * in + b)

Arguments

  • input - Input image
  • a - Multiply by this
  • b - Add this

Optional

  • uchar - Output should be uchar. Default: false

linear!(input, a, b, optional \\ [])

@spec linear!(Vix.Vips.Image.t(), [float()], [float()], [{:uchar, boolean()}]) ::
  Vix.Vips.Image.t() | no_return()

Calculate (a * in + b)

Arguments

  • input - Input image
  • a - Multiply by this
  • b - Add this

Optional

  • uchar - Output should be uchar. Default: false

linecache(input, optional \\ [])

@spec linecache(Vix.Vips.Image.t(),
  persistent: boolean(),
  threaded: boolean(),
  access: vips_access(),
  "tile-height": integer()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Cache an image as a set of lines

Arguments

  • input - Input image

Optional

  • persistent - Keep cache between evaluations. Default: false
  • threaded - Allow threaded access. Default: false
  • access - Expected access pattern. Default: :VIPS_ACCESS_RANDOM
  • tile-height - Tile height in pixels. Default: 128

linecache!(input, optional \\ [])

@spec linecache!(Vix.Vips.Image.t(),
  persistent: boolean(),
  threaded: boolean(),
  access: vips_access(),
  "tile-height": integer()
) :: Vix.Vips.Image.t() | no_return()

Cache an image as a set of lines

Arguments

  • input - Input image

Optional

  • persistent - Keep cache between evaluations. Default: false
  • threaded - Allow threaded access. Default: false
  • access - Expected access pattern. Default: :VIPS_ACCESS_RANDOM
  • tile-height - Tile height in pixels. Default: 128

logmat(sigma, min-ampl, optional \\ [])

@spec logmat(float(), float(),
  precision: vips_precision(),
  integer: boolean(),
  separable: boolean()
) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Make a laplacian of gaussian image

Arguments

  • sigma - Radius of Gaussian
  • min-ampl - Minimum amplitude of Gaussian

Optional

  • precision - Generate with this precision. Default: :VIPS_PRECISION_INTEGER
  • integer - Generate integer Gaussian. Default: false
  • separable - Generate separable Gaussian. Default: false

logmat!(sigma, min-ampl, optional \\ [])

@spec logmat!(float(), float(),
  precision: vips_precision(),
  integer: boolean(),
  separable: boolean()
) ::
  Vix.Vips.Image.t() | no_return()

Make a laplacian of gaussian image

Arguments

  • sigma - Radius of Gaussian
  • min-ampl - Minimum amplitude of Gaussian

Optional

  • precision - Generate with this precision. Default: :VIPS_PRECISION_INTEGER
  • integer - Generate integer Gaussian. Default: false
  • separable - Generate separable Gaussian. Default: false

mapim(input, index, optional \\ [])

@spec mapim(Vix.Vips.Image.t(), Vix.Vips.Image.t(),
  extend: vips_extend(),
  premultiplied: boolean(),
  background: [float()],
  interpolate: Vix.Vips.Interpolate.t()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Resample with a map image

Arguments

  • input - Input image argument
  • index - Index pixels with this

Optional

  • extend - How to generate the extra pixels. Default: :VIPS_EXTEND_BACKGROUND
  • premultiplied - Images have premultiplied alpha. Default: false
  • background - Background value. Default: nil
  • interpolate - Interpolate pixels with this.

mapim!(input, index, optional \\ [])

@spec mapim!(Vix.Vips.Image.t(), Vix.Vips.Image.t(),
  extend: vips_extend(),
  premultiplied: boolean(),
  background: [float()],
  interpolate: Vix.Vips.Interpolate.t()
) :: Vix.Vips.Image.t() | no_return()

Resample with a map image

Arguments

  • input - Input image argument
  • index - Index pixels with this

Optional

  • extend - How to generate the extra pixels. Default: :VIPS_EXTEND_BACKGROUND
  • premultiplied - Images have premultiplied alpha. Default: false
  • background - Background value. Default: nil
  • interpolate - Interpolate pixels with this.

maplut(input, lut, optional \\ [])

@spec maplut(Vix.Vips.Image.t(), Vix.Vips.Image.t(), [{:band, integer()}]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Map an image though a lut

Arguments

  • input - Input image
  • lut - Look-up table image

Optional

  • band - Apply one-band lut to this band of in. Default: -1

maplut!(input, lut, optional \\ [])

@spec maplut!(Vix.Vips.Image.t(), Vix.Vips.Image.t(), [{:band, integer()}]) ::
  Vix.Vips.Image.t() | no_return()

Map an image though a lut

Arguments

  • input - Input image
  • lut - Look-up table image

Optional

  • band - Apply one-band lut to this band of in. Default: -1

mask_butterworth(width, height, order, frequency-cutoff, amplitude-cutoff, optional \\ [])

@spec mask_butterworth(integer(), integer(), float(), float(), float(),
  optical: boolean(),
  reject: boolean(),
  nodc: boolean(),
  uchar: boolean()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Make a butterworth filter

Arguments

  • width - Image width in pixels
  • height - Image height in pixels
  • order - Filter order
  • frequency-cutoff - Frequency cutoff
  • amplitude-cutoff - Amplitude cutoff

Optional

  • optical - Rotate quadrants to optical space. Default: false
  • reject - Invert the sense of the filter. Default: false
  • nodc - Remove DC component. Default: false
  • uchar - Output an unsigned char image. Default: false

mask_butterworth!(width, height, order, frequency-cutoff, amplitude-cutoff, optional \\ [])

@spec mask_butterworth!(integer(), integer(), float(), float(), float(),
  optical: boolean(),
  reject: boolean(),
  nodc: boolean(),
  uchar: boolean()
) :: Vix.Vips.Image.t() | no_return()

Make a butterworth filter

Arguments

  • width - Image width in pixels
  • height - Image height in pixels
  • order - Filter order
  • frequency-cutoff - Frequency cutoff
  • amplitude-cutoff - Amplitude cutoff

Optional

  • optical - Rotate quadrants to optical space. Default: false
  • reject - Invert the sense of the filter. Default: false
  • nodc - Remove DC component. Default: false
  • uchar - Output an unsigned char image. Default: false

mask_butterworth_band(width, height, order, frequency-cutoff-x, frequency-cutoff-y, radius, amplitude-cutoff, optional \\ [])

@spec mask_butterworth_band(
  integer(),
  integer(),
  float(),
  float(),
  float(),
  float(),
  float(),
  optical: boolean(),
  reject: boolean(),
  nodc: boolean(),
  uchar: boolean()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Make a butterworth_band filter

Arguments

  • width - Image width in pixels
  • height - Image height in pixels
  • order - Filter order
  • frequency-cutoff-x - Frequency cutoff x
  • frequency-cutoff-y - Frequency cutoff y
  • radius - Radius of circle
  • amplitude-cutoff - Amplitude cutoff

Optional

  • optical - Rotate quadrants to optical space. Default: false
  • reject - Invert the sense of the filter. Default: false
  • nodc - Remove DC component. Default: false
  • uchar - Output an unsigned char image. Default: false

mask_butterworth_band!(width, height, order, frequency-cutoff-x, frequency-cutoff-y, radius, amplitude-cutoff, optional \\ [])

@spec mask_butterworth_band!(
  integer(),
  integer(),
  float(),
  float(),
  float(),
  float(),
  float(),
  optical: boolean(),
  reject: boolean(),
  nodc: boolean(),
  uchar: boolean()
) :: Vix.Vips.Image.t() | no_return()

Make a butterworth_band filter

Arguments

  • width - Image width in pixels
  • height - Image height in pixels
  • order - Filter order
  • frequency-cutoff-x - Frequency cutoff x
  • frequency-cutoff-y - Frequency cutoff y
  • radius - Radius of circle
  • amplitude-cutoff - Amplitude cutoff

Optional

  • optical - Rotate quadrants to optical space. Default: false
  • reject - Invert the sense of the filter. Default: false
  • nodc - Remove DC component. Default: false
  • uchar - Output an unsigned char image. Default: false

mask_butterworth_ring(width, height, order, frequency-cutoff, amplitude-cutoff, ringwidth, optional \\ [])

@spec mask_butterworth_ring(integer(), integer(), float(), float(), float(), float(),
  optical: boolean(),
  reject: boolean(),
  nodc: boolean(),
  uchar: boolean()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Make a butterworth ring filter

Arguments

  • width - Image width in pixels
  • height - Image height in pixels
  • order - Filter order
  • frequency-cutoff - Frequency cutoff
  • amplitude-cutoff - Amplitude cutoff
  • ringwidth - Ringwidth

Optional

  • optical - Rotate quadrants to optical space. Default: false
  • reject - Invert the sense of the filter. Default: false
  • nodc - Remove DC component. Default: false
  • uchar - Output an unsigned char image. Default: false

mask_butterworth_ring!(width, height, order, frequency-cutoff, amplitude-cutoff, ringwidth, optional \\ [])

@spec mask_butterworth_ring!(integer(), integer(), float(), float(), float(), float(),
  optical: boolean(),
  reject: boolean(),
  nodc: boolean(),
  uchar: boolean()
) :: Vix.Vips.Image.t() | no_return()

Make a butterworth ring filter

Arguments

  • width - Image width in pixels
  • height - Image height in pixels
  • order - Filter order
  • frequency-cutoff - Frequency cutoff
  • amplitude-cutoff - Amplitude cutoff
  • ringwidth - Ringwidth

Optional

  • optical - Rotate quadrants to optical space. Default: false
  • reject - Invert the sense of the filter. Default: false
  • nodc - Remove DC component. Default: false
  • uchar - Output an unsigned char image. Default: false

mask_fractal(width, height, fractal-dimension, optional \\ [])

@spec mask_fractal(integer(), integer(), float(),
  optical: boolean(),
  reject: boolean(),
  nodc: boolean(),
  uchar: boolean()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Make fractal filter

Arguments

  • width - Image width in pixels
  • height - Image height in pixels
  • fractal-dimension - Fractal dimension

Optional

  • optical - Rotate quadrants to optical space. Default: false
  • reject - Invert the sense of the filter. Default: false
  • nodc - Remove DC component. Default: false
  • uchar - Output an unsigned char image. Default: false

mask_fractal!(width, height, fractal-dimension, optional \\ [])

@spec mask_fractal!(integer(), integer(), float(),
  optical: boolean(),
  reject: boolean(),
  nodc: boolean(),
  uchar: boolean()
) :: Vix.Vips.Image.t() | no_return()

Make fractal filter

Arguments

  • width - Image width in pixels
  • height - Image height in pixels
  • fractal-dimension - Fractal dimension

Optional

  • optical - Rotate quadrants to optical space. Default: false
  • reject - Invert the sense of the filter. Default: false
  • nodc - Remove DC component. Default: false
  • uchar - Output an unsigned char image. Default: false

mask_gaussian(width, height, frequency-cutoff, amplitude-cutoff, optional \\ [])

@spec mask_gaussian(integer(), integer(), float(), float(),
  optical: boolean(),
  reject: boolean(),
  nodc: boolean(),
  uchar: boolean()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Make a gaussian filter

Arguments

  • width - Image width in pixels
  • height - Image height in pixels
  • frequency-cutoff - Frequency cutoff
  • amplitude-cutoff - Amplitude cutoff

Optional

  • optical - Rotate quadrants to optical space. Default: false
  • reject - Invert the sense of the filter. Default: false
  • nodc - Remove DC component. Default: false
  • uchar - Output an unsigned char image. Default: false

mask_gaussian!(width, height, frequency-cutoff, amplitude-cutoff, optional \\ [])

@spec mask_gaussian!(integer(), integer(), float(), float(),
  optical: boolean(),
  reject: boolean(),
  nodc: boolean(),
  uchar: boolean()
) :: Vix.Vips.Image.t() | no_return()

Make a gaussian filter

Arguments

  • width - Image width in pixels
  • height - Image height in pixels
  • frequency-cutoff - Frequency cutoff
  • amplitude-cutoff - Amplitude cutoff

Optional

  • optical - Rotate quadrants to optical space. Default: false
  • reject - Invert the sense of the filter. Default: false
  • nodc - Remove DC component. Default: false
  • uchar - Output an unsigned char image. Default: false

mask_gaussian_band(width, height, frequency-cutoff-x, frequency-cutoff-y, radius, amplitude-cutoff, optional \\ [])

@spec mask_gaussian_band(integer(), integer(), float(), float(), float(), float(),
  optical: boolean(),
  reject: boolean(),
  nodc: boolean(),
  uchar: boolean()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Make a gaussian filter

Arguments

  • width - Image width in pixels
  • height - Image height in pixels
  • frequency-cutoff-x - Frequency cutoff x
  • frequency-cutoff-y - Frequency cutoff y
  • radius - Radius of circle
  • amplitude-cutoff - Amplitude cutoff

Optional

  • optical - Rotate quadrants to optical space. Default: false
  • reject - Invert the sense of the filter. Default: false
  • nodc - Remove DC component. Default: false
  • uchar - Output an unsigned char image. Default: false

mask_gaussian_band!(width, height, frequency-cutoff-x, frequency-cutoff-y, radius, amplitude-cutoff, optional \\ [])

@spec mask_gaussian_band!(integer(), integer(), float(), float(), float(), float(),
  optical: boolean(),
  reject: boolean(),
  nodc: boolean(),
  uchar: boolean()
) :: Vix.Vips.Image.t() | no_return()

Make a gaussian filter

Arguments

  • width - Image width in pixels
  • height - Image height in pixels
  • frequency-cutoff-x - Frequency cutoff x
  • frequency-cutoff-y - Frequency cutoff y
  • radius - Radius of circle
  • amplitude-cutoff - Amplitude cutoff

Optional

  • optical - Rotate quadrants to optical space. Default: false
  • reject - Invert the sense of the filter. Default: false
  • nodc - Remove DC component. Default: false
  • uchar - Output an unsigned char image. Default: false

mask_gaussian_ring(width, height, frequency-cutoff, amplitude-cutoff, ringwidth, optional \\ [])

@spec mask_gaussian_ring(integer(), integer(), float(), float(), float(),
  optical: boolean(),
  reject: boolean(),
  nodc: boolean(),
  uchar: boolean()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Make a gaussian ring filter

Arguments

  • width - Image width in pixels
  • height - Image height in pixels
  • frequency-cutoff - Frequency cutoff
  • amplitude-cutoff - Amplitude cutoff
  • ringwidth - Ringwidth

Optional

  • optical - Rotate quadrants to optical space. Default: false
  • reject - Invert the sense of the filter. Default: false
  • nodc - Remove DC component. Default: false
  • uchar - Output an unsigned char image. Default: false

mask_gaussian_ring!(width, height, frequency-cutoff, amplitude-cutoff, ringwidth, optional \\ [])

@spec mask_gaussian_ring!(integer(), integer(), float(), float(), float(),
  optical: boolean(),
  reject: boolean(),
  nodc: boolean(),
  uchar: boolean()
) :: Vix.Vips.Image.t() | no_return()

Make a gaussian ring filter

Arguments

  • width - Image width in pixels
  • height - Image height in pixels
  • frequency-cutoff - Frequency cutoff
  • amplitude-cutoff - Amplitude cutoff
  • ringwidth - Ringwidth

Optional

  • optical - Rotate quadrants to optical space. Default: false
  • reject - Invert the sense of the filter. Default: false
  • nodc - Remove DC component. Default: false
  • uchar - Output an unsigned char image. Default: false

mask_ideal(width, height, frequency-cutoff, optional \\ [])

@spec mask_ideal(integer(), integer(), float(),
  optical: boolean(),
  reject: boolean(),
  nodc: boolean(),
  uchar: boolean()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Make an ideal filter

Arguments

  • width - Image width in pixels
  • height - Image height in pixels
  • frequency-cutoff - Frequency cutoff

Optional

  • optical - Rotate quadrants to optical space. Default: false
  • reject - Invert the sense of the filter. Default: false
  • nodc - Remove DC component. Default: false
  • uchar - Output an unsigned char image. Default: false

mask_ideal!(width, height, frequency-cutoff, optional \\ [])

@spec mask_ideal!(integer(), integer(), float(),
  optical: boolean(),
  reject: boolean(),
  nodc: boolean(),
  uchar: boolean()
) :: Vix.Vips.Image.t() | no_return()

Make an ideal filter

Arguments

  • width - Image width in pixels
  • height - Image height in pixels
  • frequency-cutoff - Frequency cutoff

Optional

  • optical - Rotate quadrants to optical space. Default: false
  • reject - Invert the sense of the filter. Default: false
  • nodc - Remove DC component. Default: false
  • uchar - Output an unsigned char image. Default: false

mask_ideal_band(width, height, frequency-cutoff-x, frequency-cutoff-y, radius, optional \\ [])

@spec mask_ideal_band(integer(), integer(), float(), float(), float(),
  optical: boolean(),
  reject: boolean(),
  nodc: boolean(),
  uchar: boolean()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Make an ideal band filter

Arguments

  • width - Image width in pixels
  • height - Image height in pixels
  • frequency-cutoff-x - Frequency cutoff x
  • frequency-cutoff-y - Frequency cutoff y
  • radius - Radius of circle

Optional

  • optical - Rotate quadrants to optical space. Default: false
  • reject - Invert the sense of the filter. Default: false
  • nodc - Remove DC component. Default: false
  • uchar - Output an unsigned char image. Default: false

mask_ideal_band!(width, height, frequency-cutoff-x, frequency-cutoff-y, radius, optional \\ [])

@spec mask_ideal_band!(integer(), integer(), float(), float(), float(),
  optical: boolean(),
  reject: boolean(),
  nodc: boolean(),
  uchar: boolean()
) :: Vix.Vips.Image.t() | no_return()

Make an ideal band filter

Arguments

  • width - Image width in pixels
  • height - Image height in pixels
  • frequency-cutoff-x - Frequency cutoff x
  • frequency-cutoff-y - Frequency cutoff y
  • radius - Radius of circle

Optional

  • optical - Rotate quadrants to optical space. Default: false
  • reject - Invert the sense of the filter. Default: false
  • nodc - Remove DC component. Default: false
  • uchar - Output an unsigned char image. Default: false

mask_ideal_ring(width, height, frequency-cutoff, ringwidth, optional \\ [])

@spec mask_ideal_ring(integer(), integer(), float(), float(),
  optical: boolean(),
  reject: boolean(),
  nodc: boolean(),
  uchar: boolean()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Make an ideal ring filter

Arguments

  • width - Image width in pixels
  • height - Image height in pixels
  • frequency-cutoff - Frequency cutoff
  • ringwidth - Ringwidth

Optional

  • optical - Rotate quadrants to optical space. Default: false
  • reject - Invert the sense of the filter. Default: false
  • nodc - Remove DC component. Default: false
  • uchar - Output an unsigned char image. Default: false

mask_ideal_ring!(width, height, frequency-cutoff, ringwidth, optional \\ [])

@spec mask_ideal_ring!(integer(), integer(), float(), float(),
  optical: boolean(),
  reject: boolean(),
  nodc: boolean(),
  uchar: boolean()
) :: Vix.Vips.Image.t() | no_return()

Make an ideal ring filter

Arguments

  • width - Image width in pixels
  • height - Image height in pixels
  • frequency-cutoff - Frequency cutoff
  • ringwidth - Ringwidth

Optional

  • optical - Rotate quadrants to optical space. Default: false
  • reject - Invert the sense of the filter. Default: false
  • nodc - Remove DC component. Default: false
  • uchar - Output an unsigned char image. Default: false

match(ref, sec, xr1, yr1, xs1, ys1, xr2, yr2, xs2, ys2, optional \\ [])

@spec match(
  Vix.Vips.Image.t(),
  Vix.Vips.Image.t(),
  integer(),
  integer(),
  integer(),
  integer(),
  integer(),
  integer(),
  integer(),
  integer(),
  interpolate: Vix.Vips.Interpolate.t(),
  search: boolean(),
  harea: integer(),
  hwindow: integer()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

First-order match of two images

Arguments

  • ref - Reference image
  • sec - Secondary image
  • xr1 - Position of first reference tie-point
  • yr1 - Position of first reference tie-point
  • xs1 - Position of first secondary tie-point
  • ys1 - Position of first secondary tie-point
  • xr2 - Position of second reference tie-point
  • yr2 - Position of second reference tie-point
  • xs2 - Position of second secondary tie-point
  • ys2 - Position of second secondary tie-point

Optional

  • interpolate - Interpolate pixels with this.
  • search - Search to improve tie-points. Default: false
  • harea - Half area size. Default: 1
  • hwindow - Half window size. Default: 1

match!(ref, sec, xr1, yr1, xs1, ys1, xr2, yr2, xs2, ys2, optional \\ [])

@spec match!(
  Vix.Vips.Image.t(),
  Vix.Vips.Image.t(),
  integer(),
  integer(),
  integer(),
  integer(),
  integer(),
  integer(),
  integer(),
  integer(),
  interpolate: Vix.Vips.Interpolate.t(),
  search: boolean(),
  harea: integer(),
  hwindow: integer()
) :: Vix.Vips.Image.t() | no_return()

First-order match of two images

Arguments

  • ref - Reference image
  • sec - Secondary image
  • xr1 - Position of first reference tie-point
  • yr1 - Position of first reference tie-point
  • xs1 - Position of first secondary tie-point
  • ys1 - Position of first secondary tie-point
  • xr2 - Position of second reference tie-point
  • yr2 - Position of second reference tie-point
  • xs2 - Position of second secondary tie-point
  • ys2 - Position of second secondary tie-point

Optional

  • interpolate - Interpolate pixels with this.
  • search - Search to improve tie-points. Default: false
  • harea - Half area size. Default: 1
  • hwindow - Half window size. Default: 1

math2(left, right, math2)

@spec math2(Vix.Vips.Image.t(), Vix.Vips.Image.t(), vips_operation_math2()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Binary math operations

Arguments

  • left - Left-hand image argument
  • right - Right-hand image argument
  • math2 - Math to perform

math2!(left, right, math2)

Binary math operations

Arguments

  • left - Left-hand image argument
  • right - Right-hand image argument
  • math2 - Math to perform

math2_const(input, math2, c)

@spec math2_const(Vix.Vips.Image.t(), vips_operation_math2(), [float()]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Binary math operations with a constant

Arguments

  • input - Input image
  • math2 - Math to perform
  • c - Array of constants

math2_const!(input, math2, c)

@spec math2_const!(Vix.Vips.Image.t(), vips_operation_math2(), [float()]) ::
  Vix.Vips.Image.t() | no_return()

Binary math operations with a constant

Arguments

  • input - Input image
  • math2 - Math to perform
  • c - Array of constants

math(input, math)

@spec math(Vix.Vips.Image.t(), vips_operation_math()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Apply a math operation to an image

Arguments

  • input - Input image
  • math - Math to perform

math!(input, math)

Apply a math operation to an image

Arguments

  • input - Input image
  • math - Math to perform

matrixinvert(input)

@spec matrixinvert(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Invert an matrix

Arguments

  • input - An square matrix

matrixinvert!(input)

@spec matrixinvert!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Invert an matrix

Arguments

  • input - An square matrix

matrixload(filename, optional \\ [])

@spec matrixload(String.t(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean()
) ::
  {:ok, {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}}} | {:error, term()}

Load matrix

Arguments

  • filename - Filename to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

matrixload!(filename, optional \\ [])

@spec matrixload!(String.t(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean()
) :: {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}} | no_return()

Load matrix

Arguments

  • filename - Filename to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

matrixprint(input, optional \\ [])

@spec matrixprint(Vix.Vips.Image.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep()
) :: :ok | {:error, term()}

Print matrix

Arguments

  • input - Image to save

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]

matrixprint!(input, optional \\ [])

@spec matrixprint!(Vix.Vips.Image.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep()
) :: :ok | no_return()

Print matrix

Arguments

  • input - Image to save

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]

matrixsave(input, filename, optional \\ [])

@spec matrixsave(Vix.Vips.Image.t(), String.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep()
) :: :ok | {:error, term()}

Save image to matrix

Arguments

  • input - Image to save
  • filename - Filename to save to

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]

matrixsave!(input, filename, optional \\ [])

@spec matrixsave!(Vix.Vips.Image.t(), String.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep()
) :: :ok | no_return()

Save image to matrix

Arguments

  • input - Image to save
  • filename - Filename to save to

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]

max(input, optional \\ [])

@spec max(Vix.Vips.Image.t(), [{:size, integer()}]) ::
  {:ok,
   {float(),
    %{
      "y-array": [integer()],
      "x-array": [integer()],
      "out-array": [float()],
      y: integer(),
      x: integer()
    }}}
  | {:error, term()}

Find image maximum

Arguments

  • input - Input image

Optional

  • size - Number of maximum values to find. Default: 10

Returns

Operation returns a tuple

  • out - Output value. (float())

Last value of the tuple is a map of additional output values as key-value pair.

  • y-array - Array of vertical positions. (list(integer()))
  • x-array - Array of horizontal positions. (list(integer()))
  • out-array - Array of output values. (list(float()))
  • y - Vertical position of maximum. (integer())
  • x - Horizontal position of maximum. (integer())

max!(input, optional \\ [])

@spec max!(Vix.Vips.Image.t(), [{:size, integer()}]) ::
  {float(),
   %{
     "y-array": [integer()],
     "x-array": [integer()],
     "out-array": [float()],
     y: integer(),
     x: integer()
   }}
  | no_return()

Find image maximum

Arguments

  • input - Input image

Optional

  • size - Number of maximum values to find. Default: 10

Returns

Operation returns a tuple

  • out - Output value. (float())

Last value of the tuple is a map of additional output values as key-value pair.

  • y-array - Array of vertical positions. (list(integer()))
  • x-array - Array of horizontal positions. (list(integer()))
  • out-array - Array of output values. (list(float()))
  • y - Vertical position of maximum. (integer())
  • x - Horizontal position of maximum. (integer())

measure(input, h, v, optional \\ [])

@spec measure(Vix.Vips.Image.t(), integer(), integer(),
  height: integer(),
  width: integer(),
  top: integer(),
  left: integer()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Measure a set of patches on a color chart

Arguments

  • input - Image to measure
  • h - Number of patches across chart
  • v - Number of patches down chart

Optional

  • height - Height of extract area. Default: 1
  • width - Width of extract area. Default: 1
  • top - Top edge of extract area. Default: 0
  • left - Left edge of extract area. Default: 0

measure!(input, h, v, optional \\ [])

@spec measure!(Vix.Vips.Image.t(), integer(), integer(),
  height: integer(),
  width: integer(),
  top: integer(),
  left: integer()
) :: Vix.Vips.Image.t() | no_return()

Measure a set of patches on a color chart

Arguments

  • input - Image to measure
  • h - Number of patches across chart
  • v - Number of patches down chart

Optional

  • height - Height of extract area. Default: 1
  • width - Width of extract area. Default: 1
  • top - Top edge of extract area. Default: 0
  • left - Left edge of extract area. Default: 0

merge(ref, sec, direction, dx, dy, optional \\ [])

@spec merge(
  Vix.Vips.Image.t(),
  Vix.Vips.Image.t(),
  vips_direction(),
  integer(),
  integer(),
  [
    {:mblend, integer()}
  ]
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Merge two images

Arguments

  • ref - Reference image
  • sec - Secondary image
  • direction - Horizontal or vertical merge
  • dx - Horizontal displacement from sec to ref
  • dy - Vertical displacement from sec to ref

Optional

  • mblend - Maximum blend size. Default: 10

merge!(ref, sec, direction, dx, dy, optional \\ [])

@spec merge!(
  Vix.Vips.Image.t(),
  Vix.Vips.Image.t(),
  vips_direction(),
  integer(),
  integer(),
  [
    {:mblend, integer()}
  ]
) :: Vix.Vips.Image.t() | no_return()

Merge two images

Arguments

  • ref - Reference image
  • sec - Secondary image
  • direction - Horizontal or vertical merge
  • dx - Horizontal displacement from sec to ref
  • dy - Vertical displacement from sec to ref

Optional

  • mblend - Maximum blend size. Default: 10

min(input, optional \\ [])

@spec min(Vix.Vips.Image.t(), [{:size, integer()}]) ::
  {:ok,
   {float(),
    %{
      "y-array": [integer()],
      "x-array": [integer()],
      "out-array": [float()],
      y: integer(),
      x: integer()
    }}}
  | {:error, term()}

Find image minimum

Arguments

  • input - Input image

Optional

  • size - Number of minimum values to find. Default: 10

Returns

Operation returns a tuple

  • out - Output value. (float())

Last value of the tuple is a map of additional output values as key-value pair.

  • y-array - Array of vertical positions. (list(integer()))
  • x-array - Array of horizontal positions. (list(integer()))
  • out-array - Array of output values. (list(float()))
  • y - Vertical position of minimum. (integer())
  • x - Horizontal position of minimum. (integer())

min!(input, optional \\ [])

@spec min!(Vix.Vips.Image.t(), [{:size, integer()}]) ::
  {float(),
   %{
     "y-array": [integer()],
     "x-array": [integer()],
     "out-array": [float()],
     y: integer(),
     x: integer()
   }}
  | no_return()

Find image minimum

Arguments

  • input - Input image

Optional

  • size - Number of minimum values to find. Default: 10

Returns

Operation returns a tuple

  • out - Output value. (float())

Last value of the tuple is a map of additional output values as key-value pair.

  • y-array - Array of vertical positions. (list(integer()))
  • x-array - Array of horizontal positions. (list(integer()))
  • out-array - Array of output values. (list(float()))
  • y - Vertical position of minimum. (integer())
  • x - Horizontal position of minimum. (integer())

morph(input, mask, morph)

@spec morph(Vix.Vips.Image.t(), Vix.Vips.Image.t(), vips_operation_morphology()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Morphology operation

Arguments

  • input - Input image argument
  • mask - Input matrix image
  • morph - Morphological operation to perform

morph!(input, mask, morph)

Morphology operation

Arguments

  • input - Input image argument
  • mask - Input matrix image
  • morph - Morphological operation to perform

mosaic1(ref, sec, direction, xr1, yr1, xs1, ys1, xr2, yr2, xs2, ys2, optional \\ [])

@spec mosaic1(
  Vix.Vips.Image.t(),
  Vix.Vips.Image.t(),
  vips_direction(),
  integer(),
  integer(),
  integer(),
  integer(),
  integer(),
  integer(),
  integer(),
  integer(),
  bandno: integer(),
  mblend: integer(),
  interpolate: Vix.Vips.Interpolate.t(),
  search: boolean(),
  harea: integer(),
  hwindow: integer()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

First-order mosaic of two images

Arguments

  • ref - Reference image
  • sec - Secondary image
  • direction - Horizontal or vertical mosaic
  • xr1 - Position of first reference tie-point
  • yr1 - Position of first reference tie-point
  • xs1 - Position of first secondary tie-point
  • ys1 - Position of first secondary tie-point
  • xr2 - Position of second reference tie-point
  • yr2 - Position of second reference tie-point
  • xs2 - Position of second secondary tie-point
  • ys2 - Position of second secondary tie-point

Optional

  • bandno - Band to search for features on. Default: 0
  • mblend - Maximum blend size. Default: 10
  • interpolate - Interpolate pixels with this.
  • search - Search to improve tie-points. Default: false
  • harea - Half area size. Default: 15
  • hwindow - Half window size. Default: 5

mosaic1!(ref, sec, direction, xr1, yr1, xs1, ys1, xr2, yr2, xs2, ys2, optional \\ [])

@spec mosaic1!(
  Vix.Vips.Image.t(),
  Vix.Vips.Image.t(),
  vips_direction(),
  integer(),
  integer(),
  integer(),
  integer(),
  integer(),
  integer(),
  integer(),
  integer(),
  bandno: integer(),
  mblend: integer(),
  interpolate: Vix.Vips.Interpolate.t(),
  search: boolean(),
  harea: integer(),
  hwindow: integer()
) :: Vix.Vips.Image.t() | no_return()

First-order mosaic of two images

Arguments

  • ref - Reference image
  • sec - Secondary image
  • direction - Horizontal or vertical mosaic
  • xr1 - Position of first reference tie-point
  • yr1 - Position of first reference tie-point
  • xs1 - Position of first secondary tie-point
  • ys1 - Position of first secondary tie-point
  • xr2 - Position of second reference tie-point
  • yr2 - Position of second reference tie-point
  • xs2 - Position of second secondary tie-point
  • ys2 - Position of second secondary tie-point

Optional

  • bandno - Band to search for features on. Default: 0
  • mblend - Maximum blend size. Default: 10
  • interpolate - Interpolate pixels with this.
  • search - Search to improve tie-points. Default: false
  • harea - Half area size. Default: 15
  • hwindow - Half window size. Default: 5

mosaic(ref, sec, direction, xref, yref, xsec, ysec, optional \\ [])

@spec mosaic(
  Vix.Vips.Image.t(),
  Vix.Vips.Image.t(),
  vips_direction(),
  integer(),
  integer(),
  integer(),
  integer(),
  bandno: integer(),
  mblend: integer(),
  harea: integer(),
  hwindow: integer()
) ::
  {:ok,
   {Vix.Vips.Image.t(),
    %{
      dx1: float(),
      dy1: float(),
      angle1: float(),
      scale1: float(),
      dy0: integer(),
      dx0: integer()
    }}}
  | {:error, term()}

Mosaic two images

Arguments

  • ref - Reference image
  • sec - Secondary image
  • direction - Horizontal or vertical mosaic
  • xref - Position of reference tie-point
  • yref - Position of reference tie-point
  • xsec - Position of secondary tie-point
  • ysec - Position of secondary tie-point

Optional

  • bandno - Band to search for features on. Default: 0
  • mblend - Maximum blend size. Default: 10
  • harea - Half area size. Default: 15
  • hwindow - Half window size. Default: 5

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • dx1 - Detected first-order displacement. (float())
  • dy1 - Detected first-order displacement. (float())
  • angle1 - Detected rotation. (float())
  • scale1 - Detected scale. (float())
  • dy0 - Detected integer offset. (integer())
  • dx0 - Detected integer offset. (integer())

mosaic!(ref, sec, direction, xref, yref, xsec, ysec, optional \\ [])

@spec mosaic!(
  Vix.Vips.Image.t(),
  Vix.Vips.Image.t(),
  vips_direction(),
  integer(),
  integer(),
  integer(),
  integer(),
  bandno: integer(),
  mblend: integer(),
  harea: integer(),
  hwindow: integer()
) ::
  {Vix.Vips.Image.t(),
   %{
     dx1: float(),
     dy1: float(),
     angle1: float(),
     scale1: float(),
     dy0: integer(),
     dx0: integer()
   }}
  | no_return()

Mosaic two images

Arguments

  • ref - Reference image
  • sec - Secondary image
  • direction - Horizontal or vertical mosaic
  • xref - Position of reference tie-point
  • yref - Position of reference tie-point
  • xsec - Position of secondary tie-point
  • ysec - Position of secondary tie-point

Optional

  • bandno - Band to search for features on. Default: 0
  • mblend - Maximum blend size. Default: 10
  • harea - Half area size. Default: 15
  • hwindow - Half window size. Default: 5

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • dx1 - Detected first-order displacement. (float())
  • dy1 - Detected first-order displacement. (float())
  • angle1 - Detected rotation. (float())
  • scale1 - Detected scale. (float())
  • dy0 - Detected integer offset. (integer())
  • dx0 - Detected integer offset. (integer())

msb(input, optional \\ [])

@spec msb(Vix.Vips.Image.t(), [{:band, integer()}]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Pick most-significant byte from an image

Arguments

  • input - Input image

Optional

  • band - Band to msb. Default: 0

msb!(input, optional \\ [])

@spec msb!(Vix.Vips.Image.t(), [{:band, integer()}]) ::
  Vix.Vips.Image.t() | no_return()

Pick most-significant byte from an image

Arguments

  • input - Input image

Optional

  • band - Band to msb. Default: 0

multiply(left, right)

@spec multiply(Vix.Vips.Image.t(), Vix.Vips.Image.t()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Multiply two images

Arguments

  • left - Left-hand image argument
  • right - Right-hand image argument

multiply!(left, right)

Multiply two images

Arguments

  • left - Left-hand image argument
  • right - Right-hand image argument

percent(input, percent)

@spec percent(Vix.Vips.Image.t(), float()) :: {:ok, integer()} | {:error, term()}

Find threshold for percent of pixels

Arguments

  • input - Input image
  • percent - Percent of pixels

percent!(input, percent)

@spec percent!(Vix.Vips.Image.t(), float()) :: integer() | no_return()

Find threshold for percent of pixels

Arguments

  • input - Input image
  • percent - Percent of pixels

perlin(width, height, optional \\ [])

@spec perlin(integer(), integer(),
  seed: integer(),
  uchar: boolean(),
  "cell-size": integer()
) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Make a perlin noise image

Arguments

  • width - Image width in pixels
  • height - Image height in pixels

Optional

  • seed - Random number seed. Default: 0
  • uchar - Output an unsigned char image. Default: false
  • cell-size - Size of Perlin cells. Default: 256

perlin!(width, height, optional \\ [])

@spec perlin!(integer(), integer(),
  seed: integer(),
  uchar: boolean(),
  "cell-size": integer()
) ::
  Vix.Vips.Image.t() | no_return()

Make a perlin noise image

Arguments

  • width - Image width in pixels
  • height - Image height in pixels

Optional

  • seed - Random number seed. Default: 0
  • uchar - Output an unsigned char image. Default: false
  • cell-size - Size of Perlin cells. Default: 256

phasecor(input, in2)

@spec phasecor(Vix.Vips.Image.t(), Vix.Vips.Image.t()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Calculate phase correlation

Arguments

  • input - Input image
  • in2 - Second input image

phasecor!(input, in2)

Calculate phase correlation

Arguments

  • input - Input image
  • in2 - Second input image

pngload(filename, optional \\ [])

@spec pngload(String.t(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  unlimited: boolean()
) ::
  {:ok, {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}}} | {:error, term()}

Load png from file

Arguments

  • filename - Filename to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • unlimited - Remove all denial of service limits. Default: false

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

pngload!(filename, optional \\ [])

@spec pngload!(String.t(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  unlimited: boolean()
) :: {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}} | no_return()

Load png from file

Arguments

  • filename - Filename to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • unlimited - Remove all denial of service limits. Default: false

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

pngload_buffer(buffer, optional \\ [])

@spec pngload_buffer(binary(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  unlimited: boolean()
) ::
  {:ok, {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}}} | {:error, term()}

Load png from buffer

Arguments

  • buffer - Buffer to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • unlimited - Remove all denial of service limits. Default: false

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

pngload_buffer!(buffer, optional \\ [])

@spec pngload_buffer!(binary(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  unlimited: boolean()
) :: {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}} | no_return()

Load png from buffer

Arguments

  • buffer - Buffer to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • unlimited - Remove all denial of service limits. Default: false

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

pngsave(input, filename, optional \\ [])

@spec pngsave(Vix.Vips.Image.t(), String.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  effort: integer(),
  bitdepth: integer(),
  dither: float(),
  Q: integer(),
  colours: integer(),
  palette: boolean(),
  filter: vips_foreign_png_filter(),
  interlace: boolean(),
  compression: integer()
) :: :ok | {:error, term()}

Save image to file as png

Arguments

  • input - Image to save
  • filename - Filename to save to

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • effort - Quantisation CPU effort. Default: 7
  • bitdepth - Write as a 1, 2, 4, 8 or 16 bit image. Default: 8
  • dither - Amount of dithering. Default: 1.0
  • Q - Quantisation quality. Default: 100
  • colours - Max number of palette colours. Default: 256
  • palette - Quantise to 8bpp palette. Default: false
  • filter - libspng row filter flag(s). Default: [:VIPS_FOREIGN_PNG_FILTER_NONE]
  • interlace - Interlace image. Default: false
  • compression - Compression factor. Default: 6

pngsave!(input, filename, optional \\ [])

@spec pngsave!(Vix.Vips.Image.t(), String.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  effort: integer(),
  bitdepth: integer(),
  dither: float(),
  Q: integer(),
  colours: integer(),
  palette: boolean(),
  filter: vips_foreign_png_filter(),
  interlace: boolean(),
  compression: integer()
) :: :ok | no_return()

Save image to file as png

Arguments

  • input - Image to save
  • filename - Filename to save to

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • effort - Quantisation CPU effort. Default: 7
  • bitdepth - Write as a 1, 2, 4, 8 or 16 bit image. Default: 8
  • dither - Amount of dithering. Default: 1.0
  • Q - Quantisation quality. Default: 100
  • colours - Max number of palette colours. Default: 256
  • palette - Quantise to 8bpp palette. Default: false
  • filter - libspng row filter flag(s). Default: [:VIPS_FOREIGN_PNG_FILTER_NONE]
  • interlace - Interlace image. Default: false
  • compression - Compression factor. Default: 6

pngsave_buffer(input, optional \\ [])

@spec pngsave_buffer(Vix.Vips.Image.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  effort: integer(),
  bitdepth: integer(),
  dither: float(),
  Q: integer(),
  colours: integer(),
  palette: boolean(),
  filter: vips_foreign_png_filter(),
  interlace: boolean(),
  compression: integer()
) :: {:ok, binary()} | {:error, term()}

Save image to buffer as png

Arguments

  • input - Image to save

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • effort - Quantisation CPU effort. Default: 7
  • bitdepth - Write as a 1, 2, 4, 8 or 16 bit image. Default: 8
  • dither - Amount of dithering. Default: 1.0
  • Q - Quantisation quality. Default: 100
  • colours - Max number of palette colours. Default: 256
  • palette - Quantise to 8bpp palette. Default: false
  • filter - libspng row filter flag(s). Default: [:VIPS_FOREIGN_PNG_FILTER_NONE]
  • interlace - Interlace image. Default: false
  • compression - Compression factor. Default: 6

pngsave_buffer!(input, optional \\ [])

@spec pngsave_buffer!(Vix.Vips.Image.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  effort: integer(),
  bitdepth: integer(),
  dither: float(),
  Q: integer(),
  colours: integer(),
  palette: boolean(),
  filter: vips_foreign_png_filter(),
  interlace: boolean(),
  compression: integer()
) :: binary() | no_return()

Save image to buffer as png

Arguments

  • input - Image to save

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • effort - Quantisation CPU effort. Default: 7
  • bitdepth - Write as a 1, 2, 4, 8 or 16 bit image. Default: 8
  • dither - Amount of dithering. Default: 1.0
  • Q - Quantisation quality. Default: 100
  • colours - Max number of palette colours. Default: 256
  • palette - Quantise to 8bpp palette. Default: false
  • filter - libspng row filter flag(s). Default: [:VIPS_FOREIGN_PNG_FILTER_NONE]
  • interlace - Interlace image. Default: false
  • compression - Compression factor. Default: 6

premultiply(input, optional \\ [])

@spec premultiply(Vix.Vips.Image.t(), [{:"max-alpha", float()}]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Premultiply image alpha

Arguments

  • input - Input image

Optional

  • max-alpha - Maximum value of alpha channel. Default: 255.0

premultiply!(input, optional \\ [])

@spec premultiply!(Vix.Vips.Image.t(), [{:"max-alpha", float()}]) ::
  Vix.Vips.Image.t() | no_return()

Premultiply image alpha

Arguments

  • input - Input image

Optional

  • max-alpha - Maximum value of alpha channel. Default: 255.0

prewitt(input)

@spec prewitt(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Prewitt edge detector

Arguments

  • input - Input image

prewitt!(input)

@spec prewitt!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Prewitt edge detector

Arguments

  • input - Input image

profile(input)

@spec profile(Vix.Vips.Image.t()) ::
  {:ok, {Vix.Vips.Image.t(), Vix.Vips.Image.t()}} | {:error, term()}

Find image profiles

Arguments

  • input - Input image

Returns

Operation returns a tuple

  • columns - First non-zero pixel in column. (Vix.Vips.Image.t())
  • rows - First non-zero pixel in row. (Vix.Vips.Image.t())

profile!(input)

Find image profiles

Arguments

  • input - Input image

Returns

Operation returns a tuple

  • columns - First non-zero pixel in column. (Vix.Vips.Image.t())
  • rows - First non-zero pixel in row. (Vix.Vips.Image.t())

profile_load(name)

@spec profile_load(String.t()) :: {:ok, binary()} | {:error, term()}

Load named icc profile

Arguments

  • name - Profile name

profile_load!(name)

@spec profile_load!(String.t()) :: binary() | no_return()

Load named icc profile

Arguments

  • name - Profile name

project(input)

@spec project(Vix.Vips.Image.t()) ::
  {:ok, {Vix.Vips.Image.t(), Vix.Vips.Image.t()}} | {:error, term()}

Find image projections

Arguments

  • input - Input image

Returns

Operation returns a tuple

  • columns - Sums of columns. (Vix.Vips.Image.t())
  • rows - Sums of rows. (Vix.Vips.Image.t())

project!(input)

Find image projections

Arguments

  • input - Input image

Returns

Operation returns a tuple

  • columns - Sums of columns. (Vix.Vips.Image.t())
  • rows - Sums of rows. (Vix.Vips.Image.t())

quadratic(input, coeff, optional \\ [])

@spec quadratic(Vix.Vips.Image.t(), Vix.Vips.Image.t(), [
  {:interpolate, Vix.Vips.Interpolate.t()}
]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Resample an image with a quadratic transform

Arguments

  • input - Input image argument
  • coeff - Coefficient matrix

Optional

  • interpolate - Interpolate values with this.

quadratic!(input, coeff, optional \\ [])

@spec quadratic!(Vix.Vips.Image.t(), Vix.Vips.Image.t(), [
  {:interpolate, Vix.Vips.Interpolate.t()}
]) ::
  Vix.Vips.Image.t() | no_return()

Resample an image with a quadratic transform

Arguments

  • input - Input image argument
  • coeff - Coefficient matrix

Optional

  • interpolate - Interpolate values with this.

rad2float(input)

@spec rad2float(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Unpack radiance coding to float rgb

Arguments

  • input - Input image

rad2float!(input)

@spec rad2float!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Unpack radiance coding to float rgb

Arguments

  • input - Input image

rank(input, width, height, index)

@spec rank(Vix.Vips.Image.t(), integer(), integer(), integer()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Rank filter

Arguments

  • input - Input image argument
  • width - Window width in pixels
  • height - Window height in pixels
  • index - Select pixel at index

rank!(input, width, height, index)

Rank filter

Arguments

  • input - Input image argument
  • width - Window width in pixels
  • height - Window height in pixels
  • index - Select pixel at index

rawload(filename, width, height, bands, optional \\ [])

@spec rawload(String.t(), integer(), integer(), integer(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  interpretation: vips_interpretation(),
  format: vips_band_format(),
  offset: non_neg_integer()
) ::
  {:ok, {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}}} | {:error, term()}

Load raw data from a file

Arguments

  • filename - Filename to load from
  • width - Image width in pixels
  • height - Image height in pixels
  • bands - Number of bands in image

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • interpretation - Pixel interpretation. Default: :VIPS_INTERPRETATION_MULTIBAND
  • format - Pixel format in image. Default: :VIPS_FORMAT_UCHAR
  • offset - Offset in bytes from start of file. Default: 0

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

rawload!(filename, width, height, bands, optional \\ [])

@spec rawload!(String.t(), integer(), integer(), integer(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  interpretation: vips_interpretation(),
  format: vips_band_format(),
  offset: non_neg_integer()
) :: {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}} | no_return()

Load raw data from a file

Arguments

  • filename - Filename to load from
  • width - Image width in pixels
  • height - Image height in pixels
  • bands - Number of bands in image

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • interpretation - Pixel interpretation. Default: :VIPS_INTERPRETATION_MULTIBAND
  • format - Pixel format in image. Default: :VIPS_FORMAT_UCHAR
  • offset - Offset in bytes from start of file. Default: 0

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

rawsave(input, filename, optional \\ [])

@spec rawsave(Vix.Vips.Image.t(), String.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep()
) :: :ok | {:error, term()}

Save image to raw file

Arguments

  • input - Image to save
  • filename - Filename to save to

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]

rawsave!(input, filename, optional \\ [])

@spec rawsave!(Vix.Vips.Image.t(), String.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep()
) :: :ok | no_return()

Save image to raw file

Arguments

  • input - Image to save
  • filename - Filename to save to

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]

rawsave_fd(input, fd, optional \\ [])

@spec rawsave_fd(Vix.Vips.Image.t(), integer(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep()
) :: :ok | {:error, term()}

Write raw image to file descriptor

Arguments

  • input - Image to save
  • fd - File descriptor to write to

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]

rawsave_fd!(input, fd, optional \\ [])

@spec rawsave_fd!(Vix.Vips.Image.t(), integer(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep()
) :: :ok | no_return()

Write raw image to file descriptor

Arguments

  • input - Image to save
  • fd - File descriptor to write to

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]

recomb(input, m)

@spec recomb(Vix.Vips.Image.t(), Vix.Vips.Image.t()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Linear recombination with matrix

Arguments

  • input - Input image argument
  • m - Matrix of coefficients

recomb!(input, m)

Linear recombination with matrix

Arguments

  • input - Input image argument
  • m - Matrix of coefficients

reduce(input, hshrink, vshrink, optional \\ [])

@spec reduce(Vix.Vips.Image.t(), float(), float(),
  centre: boolean(),
  gap: float(),
  kernel: vips_kernel()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Reduce an image

Arguments

  • input - Input image argument
  • hshrink - Horizontal shrink factor
  • vshrink - Vertical shrink factor

Optional

  • centre - Use centre sampling convention. Default: false
  • gap - Reducing gap. Default: 0.0
  • kernel - Resampling kernel. Default: :VIPS_KERNEL_LANCZOS3

reduce!(input, hshrink, vshrink, optional \\ [])

@spec reduce!(Vix.Vips.Image.t(), float(), float(),
  centre: boolean(),
  gap: float(),
  kernel: vips_kernel()
) :: Vix.Vips.Image.t() | no_return()

Reduce an image

Arguments

  • input - Input image argument
  • hshrink - Horizontal shrink factor
  • vshrink - Vertical shrink factor

Optional

  • centre - Use centre sampling convention. Default: false
  • gap - Reducing gap. Default: 0.0
  • kernel - Resampling kernel. Default: :VIPS_KERNEL_LANCZOS3

reduceh(input, hshrink, optional \\ [])

@spec reduceh(Vix.Vips.Image.t(), float(),
  centre: boolean(),
  gap: float(),
  kernel: vips_kernel()
) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Shrink an image horizontally

Arguments

  • input - Input image argument
  • hshrink - Horizontal shrink factor

Optional

  • centre - Use centre sampling convention. Default: false
  • gap - Reducing gap. Default: 0.0
  • kernel - Resampling kernel. Default: :VIPS_KERNEL_LANCZOS3

reduceh!(input, hshrink, optional \\ [])

@spec reduceh!(Vix.Vips.Image.t(), float(),
  centre: boolean(),
  gap: float(),
  kernel: vips_kernel()
) ::
  Vix.Vips.Image.t() | no_return()

Shrink an image horizontally

Arguments

  • input - Input image argument
  • hshrink - Horizontal shrink factor

Optional

  • centre - Use centre sampling convention. Default: false
  • gap - Reducing gap. Default: 0.0
  • kernel - Resampling kernel. Default: :VIPS_KERNEL_LANCZOS3

reducev(input, vshrink, optional \\ [])

@spec reducev(Vix.Vips.Image.t(), float(),
  centre: boolean(),
  gap: float(),
  kernel: vips_kernel()
) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Shrink an image vertically

Arguments

  • input - Input image argument
  • vshrink - Vertical shrink factor

Optional

  • centre - Use centre sampling convention. Default: false
  • gap - Reducing gap. Default: 0.0
  • kernel - Resampling kernel. Default: :VIPS_KERNEL_LANCZOS3

reducev!(input, vshrink, optional \\ [])

@spec reducev!(Vix.Vips.Image.t(), float(),
  centre: boolean(),
  gap: float(),
  kernel: vips_kernel()
) ::
  Vix.Vips.Image.t() | no_return()

Shrink an image vertically

Arguments

  • input - Input image argument
  • vshrink - Vertical shrink factor

Optional

  • centre - Use centre sampling convention. Default: false
  • gap - Reducing gap. Default: 0.0
  • kernel - Resampling kernel. Default: :VIPS_KERNEL_LANCZOS3

relational(left, right, relational)

@spec relational(Vix.Vips.Image.t(), Vix.Vips.Image.t(), vips_operation_relational()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Relational operation on two images

Arguments

  • left - Left-hand image argument
  • right - Right-hand image argument
  • relational - Relational to perform

relational!(left, right, relational)

Relational operation on two images

Arguments

  • left - Left-hand image argument
  • right - Right-hand image argument
  • relational - Relational to perform

relational_const(input, relational, c)

@spec relational_const(Vix.Vips.Image.t(), vips_operation_relational(), [float()]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Relational operations against a constant

Arguments

  • input - Input image
  • relational - Relational to perform
  • c - Array of constants

relational_const!(input, relational, c)

@spec relational_const!(Vix.Vips.Image.t(), vips_operation_relational(), [float()]) ::
  Vix.Vips.Image.t() | no_return()

Relational operations against a constant

Arguments

  • input - Input image
  • relational - Relational to perform
  • c - Array of constants

remainder(left, right)

@spec remainder(Vix.Vips.Image.t(), Vix.Vips.Image.t()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Remainder after integer division of two images

Arguments

  • left - Left-hand image argument
  • right - Right-hand image argument

remainder!(left, right)

Remainder after integer division of two images

Arguments

  • left - Left-hand image argument
  • right - Right-hand image argument

remainder_const(input, c)

@spec remainder_const(Vix.Vips.Image.t(), [float()]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Remainder after integer division of an image and a constant

Arguments

  • input - Input image
  • c - Array of constants

remainder_const!(input, c)

@spec remainder_const!(Vix.Vips.Image.t(), [float()]) ::
  Vix.Vips.Image.t() | no_return()

Remainder after integer division of an image and a constant

Arguments

  • input - Input image
  • c - Array of constants

replicate(input, across, down)

@spec replicate(Vix.Vips.Image.t(), integer(), integer()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Replicate an image

Arguments

  • input - Input image
  • across - Repeat this many times horizontally
  • down - Repeat this many times vertically

replicate!(input, across, down)

@spec replicate!(Vix.Vips.Image.t(), integer(), integer()) ::
  Vix.Vips.Image.t() | no_return()

Replicate an image

Arguments

  • input - Input image
  • across - Repeat this many times horizontally
  • down - Repeat this many times vertically

resize(input, scale, optional \\ [])

@spec resize(Vix.Vips.Image.t(), float(),
  idy: float(),
  idx: float(),
  vscale: float(),
  centre: boolean(),
  gap: float(),
  kernel: vips_kernel(),
  interpolate: Vix.Vips.Interpolate.t()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Resize an image

Arguments

  • input - Input image argument
  • scale - Scale image by this factor

Optional

  • idy - Vertical input displacement. Default: 0.0
  • idx - Horizontal input displacement. Default: 0.0
  • vscale - Vertical scale image by this factor. Default: 0.0
  • centre - Use centre sampling convention. Default: false
  • gap - Reducing gap. Default: 2.0
  • kernel - Resampling kernel. Default: :VIPS_KERNEL_LANCZOS3
  • interpolate - Interpolate pixels with this.

resize!(input, scale, optional \\ [])

@spec resize!(Vix.Vips.Image.t(), float(),
  idy: float(),
  idx: float(),
  vscale: float(),
  centre: boolean(),
  gap: float(),
  kernel: vips_kernel(),
  interpolate: Vix.Vips.Interpolate.t()
) :: Vix.Vips.Image.t() | no_return()

Resize an image

Arguments

  • input - Input image argument
  • scale - Scale image by this factor

Optional

  • idy - Vertical input displacement. Default: 0.0
  • idx - Horizontal input displacement. Default: 0.0
  • vscale - Vertical scale image by this factor. Default: 0.0
  • centre - Use centre sampling convention. Default: false
  • gap - Reducing gap. Default: 2.0
  • kernel - Resampling kernel. Default: :VIPS_KERNEL_LANCZOS3
  • interpolate - Interpolate pixels with this.

rot45(input, optional \\ [])

@spec rot45(Vix.Vips.Image.t(), [{:angle, vips_angle45()}]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Rotate an image

Arguments

  • input - Input image

Optional

  • angle - Angle to rotate image. Default: :VIPS_ANGLE45_D45

rot45!(input, optional \\ [])

@spec rot45!(Vix.Vips.Image.t(), [{:angle, vips_angle45()}]) ::
  Vix.Vips.Image.t() | no_return()

Rotate an image

Arguments

  • input - Input image

Optional

  • angle - Angle to rotate image. Default: :VIPS_ANGLE45_D45

rot(input, angle)

@spec rot(Vix.Vips.Image.t(), vips_angle()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Rotate an image

Arguments

  • input - Input image
  • angle - Angle to rotate image

rot!(input, angle)

Rotate an image

Arguments

  • input - Input image
  • angle - Angle to rotate image

rotate(input, angle, optional \\ [])

@spec rotate(Vix.Vips.Image.t(), float(),
  idy: float(),
  idx: float(),
  ody: float(),
  odx: float(),
  background: [float()],
  interpolate: Vix.Vips.Interpolate.t()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Rotate an image by a number of degrees

Arguments

  • input - Input image argument
  • angle - Rotate anticlockwise by this many degrees

Optional

  • idy - Vertical input displacement. Default: 0.0
  • idx - Horizontal input displacement. Default: 0.0
  • ody - Vertical output displacement. Default: 0.0
  • odx - Horizontal output displacement. Default: 0.0
  • background - Background value. Default: nil
  • interpolate - Interpolate pixels with this.

rotate!(input, angle, optional \\ [])

@spec rotate!(Vix.Vips.Image.t(), float(),
  idy: float(),
  idx: float(),
  ody: float(),
  odx: float(),
  background: [float()],
  interpolate: Vix.Vips.Interpolate.t()
) :: Vix.Vips.Image.t() | no_return()

Rotate an image by a number of degrees

Arguments

  • input - Input image argument
  • angle - Rotate anticlockwise by this many degrees

Optional

  • idy - Vertical input displacement. Default: 0.0
  • idx - Horizontal input displacement. Default: 0.0
  • ody - Vertical output displacement. Default: 0.0
  • odx - Horizontal output displacement. Default: 0.0
  • background - Background value. Default: nil
  • interpolate - Interpolate pixels with this.

round(input, round)

@spec round(Vix.Vips.Image.t(), vips_operation_round()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Perform a round function on an image

Arguments

  • input - Input image
  • round - Rounding operation to perform

round!(input, round)

Perform a round function on an image

Arguments

  • input - Input image
  • round - Rounding operation to perform

scale(input, optional \\ [])

@spec scale(Vix.Vips.Image.t(), log: boolean(), exp: float()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Scale an image to uchar

Arguments

  • input - Input image

Optional

  • log - Log scale. Default: false
  • exp - Exponent for log scale. Default: 0.25

scale!(input, optional \\ [])

@spec scale!(Vix.Vips.Image.t(), log: boolean(), exp: float()) ::
  Vix.Vips.Image.t() | no_return()

Scale an image to uchar

Arguments

  • input - Input image

Optional

  • log - Log scale. Default: false
  • exp - Exponent for log scale. Default: 0.25

scharr(input)

@spec scharr(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Scharr edge detector

Arguments

  • input - Input image

scharr!(input)

@spec scharr!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Scharr edge detector

Arguments

  • input - Input image

scrgb2bw(input, optional \\ [])

@spec scrgb2bw(Vix.Vips.Image.t(), [{:depth, integer()}]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Convert scrgb to bw

Arguments

  • input - Input image

Optional

  • depth - Output device space depth in bits. Default: 8

scrgb2bw!(input, optional \\ [])

@spec scrgb2bw!(Vix.Vips.Image.t(), [{:depth, integer()}]) ::
  Vix.Vips.Image.t() | no_return()

Convert scrgb to bw

Arguments

  • input - Input image

Optional

  • depth - Output device space depth in bits. Default: 8

scrgb2srgb(input, optional \\ [])

@spec scrgb2srgb(Vix.Vips.Image.t(), [{:depth, integer()}]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Convert an scrgb image to srgb

Arguments

  • input - Input image

Optional

  • depth - Output device space depth in bits. Default: 8

scrgb2srgb!(input, optional \\ [])

@spec scrgb2srgb!(Vix.Vips.Image.t(), [{:depth, integer()}]) ::
  Vix.Vips.Image.t() | no_return()

Convert an scrgb image to srgb

Arguments

  • input - Input image

Optional

  • depth - Output device space depth in bits. Default: 8

scrgb2xyz(input)

@spec scrgb2xyz(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Transform scrgb to xyz

Arguments

  • input - Input image

scrgb2xyz!(input)

@spec scrgb2xyz!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Transform scrgb to xyz

Arguments

  • input - Input image

sequential(input, optional \\ [])

@spec sequential(Vix.Vips.Image.t(),
  access: vips_access(),
  "tile-height": integer(),
  trace: boolean()
) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Check sequential access

Arguments

  • input - Input image

Optional

  • access - Expected access pattern. Default: :VIPS_ACCESS_SEQUENTIAL
  • tile-height - Tile height in pixels. Default: 1
  • trace - Trace pixel requests. Default: true

sequential!(input, optional \\ [])

@spec sequential!(Vix.Vips.Image.t(),
  access: vips_access(),
  "tile-height": integer(),
  trace: boolean()
) ::
  Vix.Vips.Image.t() | no_return()

Check sequential access

Arguments

  • input - Input image

Optional

  • access - Expected access pattern. Default: :VIPS_ACCESS_SEQUENTIAL
  • tile-height - Tile height in pixels. Default: 1
  • trace - Trace pixel requests. Default: true

sharpen(input, optional \\ [])

@spec sharpen(Vix.Vips.Image.t(),
  m2: float(),
  m1: float(),
  y3: float(),
  y2: float(),
  x1: float(),
  sigma: float(),
  radius: integer()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Unsharp masking for print

Arguments

  • input - Input image

Optional

  • m2 - Slope for jaggy areas. Default: 3.0
  • m1 - Slope for flat areas. Default: 0.0
  • y3 - Maximum darkening. Default: 20.0
  • y2 - Maximum brightening. Default: 10.0
  • x1 - Flat/jaggy threshold. Default: 2.0
  • sigma - Sigma of Gaussian. Default: 0.5
  • radius - Radius of Gaussian. Default: 1

sharpen!(input, optional \\ [])

@spec sharpen!(Vix.Vips.Image.t(),
  m2: float(),
  m1: float(),
  y3: float(),
  y2: float(),
  x1: float(),
  sigma: float(),
  radius: integer()
) :: Vix.Vips.Image.t() | no_return()

Unsharp masking for print

Arguments

  • input - Input image

Optional

  • m2 - Slope for jaggy areas. Default: 3.0
  • m1 - Slope for flat areas. Default: 0.0
  • y3 - Maximum darkening. Default: 20.0
  • y2 - Maximum brightening. Default: 10.0
  • x1 - Flat/jaggy threshold. Default: 2.0
  • sigma - Sigma of Gaussian. Default: 0.5
  • radius - Radius of Gaussian. Default: 1

shrink(input, hshrink, vshrink, optional \\ [])

@spec shrink(Vix.Vips.Image.t(), float(), float(), [{:ceil, boolean()}]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Shrink an image

Arguments

  • input - Input image argument
  • hshrink - Horizontal shrink factor
  • vshrink - Vertical shrink factor

Optional

  • ceil - Round-up output dimensions. Default: false

shrink!(input, hshrink, vshrink, optional \\ [])

@spec shrink!(Vix.Vips.Image.t(), float(), float(), [{:ceil, boolean()}]) ::
  Vix.Vips.Image.t() | no_return()

Shrink an image

Arguments

  • input - Input image argument
  • hshrink - Horizontal shrink factor
  • vshrink - Vertical shrink factor

Optional

  • ceil - Round-up output dimensions. Default: false

shrinkh(input, hshrink, optional \\ [])

@spec shrinkh(Vix.Vips.Image.t(), integer(), [{:ceil, boolean()}]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Shrink an image horizontally

Arguments

  • input - Input image argument
  • hshrink - Horizontal shrink factor

Optional

  • ceil - Round-up output dimensions. Default: false

shrinkh!(input, hshrink, optional \\ [])

@spec shrinkh!(Vix.Vips.Image.t(), integer(), [{:ceil, boolean()}]) ::
  Vix.Vips.Image.t() | no_return()

Shrink an image horizontally

Arguments

  • input - Input image argument
  • hshrink - Horizontal shrink factor

Optional

  • ceil - Round-up output dimensions. Default: false

shrinkv(input, vshrink, optional \\ [])

@spec shrinkv(Vix.Vips.Image.t(), integer(), [{:ceil, boolean()}]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Shrink an image vertically

Arguments

  • input - Input image argument
  • vshrink - Vertical shrink factor

Optional

  • ceil - Round-up output dimensions. Default: false

shrinkv!(input, vshrink, optional \\ [])

@spec shrinkv!(Vix.Vips.Image.t(), integer(), [{:ceil, boolean()}]) ::
  Vix.Vips.Image.t() | no_return()

Shrink an image vertically

Arguments

  • input - Input image argument
  • vshrink - Vertical shrink factor

Optional

  • ceil - Round-up output dimensions. Default: false

sign(input)

@spec sign(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Unit vector of pixel

Arguments

  • input - Input image

sign!(input)

@spec sign!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Unit vector of pixel

Arguments

  • input - Input image

similarity(input, optional \\ [])

@spec similarity(Vix.Vips.Image.t(),
  idy: float(),
  idx: float(),
  ody: float(),
  odx: float(),
  background: [float()],
  interpolate: Vix.Vips.Interpolate.t(),
  angle: float(),
  scale: float()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Similarity transform of an image

Arguments

  • input - Input image argument

Optional

  • idy - Vertical input displacement. Default: 0.0
  • idx - Horizontal input displacement. Default: 0.0
  • ody - Vertical output displacement. Default: 0.0
  • odx - Horizontal output displacement. Default: 0.0
  • background - Background value. Default: nil
  • interpolate - Interpolate pixels with this.
  • angle - Rotate anticlockwise by this many degrees. Default: 0.0
  • scale - Scale by this factor. Default: 1.0

similarity!(input, optional \\ [])

@spec similarity!(Vix.Vips.Image.t(),
  idy: float(),
  idx: float(),
  ody: float(),
  odx: float(),
  background: [float()],
  interpolate: Vix.Vips.Interpolate.t(),
  angle: float(),
  scale: float()
) :: Vix.Vips.Image.t() | no_return()

Similarity transform of an image

Arguments

  • input - Input image argument

Optional

  • idy - Vertical input displacement. Default: 0.0
  • idx - Horizontal input displacement. Default: 0.0
  • ody - Vertical output displacement. Default: 0.0
  • odx - Horizontal output displacement. Default: 0.0
  • background - Background value. Default: nil
  • interpolate - Interpolate pixels with this.
  • angle - Rotate anticlockwise by this many degrees. Default: 0.0
  • scale - Scale by this factor. Default: 1.0

sines(width, height, optional \\ [])

@spec sines(integer(), integer(), vfreq: float(), hfreq: float(), uchar: boolean()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Make a 2d sine wave

Arguments

  • width - Image width in pixels
  • height - Image height in pixels

Optional

  • vfreq - Vertical spatial frequency. Default: 0.5
  • hfreq - Horizontal spatial frequency. Default: 0.5
  • uchar - Output an unsigned char image. Default: false

sines!(width, height, optional \\ [])

@spec sines!(integer(), integer(), vfreq: float(), hfreq: float(), uchar: boolean()) ::
  Vix.Vips.Image.t() | no_return()

Make a 2d sine wave

Arguments

  • width - Image width in pixels
  • height - Image height in pixels

Optional

  • vfreq - Vertical spatial frequency. Default: 0.5
  • hfreq - Horizontal spatial frequency. Default: 0.5
  • uchar - Output an unsigned char image. Default: false

smartcrop(input, width, height, optional \\ [])

@spec smartcrop(Vix.Vips.Image.t(), integer(), integer(),
  premultiplied: boolean(),
  interesting: vips_interesting()
) ::
  {:ok,
   {Vix.Vips.Image.t(), %{"attention-y": integer(), "attention-x": integer()}}}
  | {:error, term()}

Extract an area from an image

Arguments

  • input - Input image
  • width - Width of extract area
  • height - Height of extract area

Optional

  • premultiplied - Input image already has premultiplied alpha. Default: false
  • interesting - How to measure interestingness. Default: :VIPS_INTERESTING_ATTENTION

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • attention-y - Vertical position of attention centre. (integer())
  • attention-x - Horizontal position of attention centre. (integer())

smartcrop!(input, width, height, optional \\ [])

@spec smartcrop!(Vix.Vips.Image.t(), integer(), integer(),
  premultiplied: boolean(),
  interesting: vips_interesting()
) ::
  {Vix.Vips.Image.t(), %{"attention-y": integer(), "attention-x": integer()}}
  | no_return()

Extract an area from an image

Arguments

  • input - Input image
  • width - Width of extract area
  • height - Height of extract area

Optional

  • premultiplied - Input image already has premultiplied alpha. Default: false
  • interesting - How to measure interestingness. Default: :VIPS_INTERESTING_ATTENTION

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • attention-y - Vertical position of attention centre. (integer())
  • attention-x - Horizontal position of attention centre. (integer())

sobel(input)

@spec sobel(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Sobel edge detector

Arguments

  • input - Input image

sobel!(input)

@spec sobel!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Sobel edge detector

Arguments

  • input - Input image

spcor(input, ref)

@spec spcor(Vix.Vips.Image.t(), Vix.Vips.Image.t()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Spatial correlation

Arguments

  • input - Input image argument
  • ref - Input reference image

spcor!(input, ref)

Spatial correlation

Arguments

  • input - Input image argument
  • ref - Input reference image

spectrum(input)

@spec spectrum(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Make displayable power spectrum

Arguments

  • input - Input image

spectrum!(input)

@spec spectrum!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Make displayable power spectrum

Arguments

  • input - Input image

srgb2hsv(input)

@spec srgb2hsv(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Transform srgb to hsv

Arguments

  • input - Input image

srgb2hsv!(input)

@spec srgb2hsv!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Transform srgb to hsv

Arguments

  • input - Input image

srgb2scrgb(input)

@spec srgb2scrgb(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Convert an srgb image to scrgb

Arguments

  • input - Input image

srgb2scrgb!(input)

@spec srgb2scrgb!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Convert an srgb image to scrgb

Arguments

  • input - Input image

stats(input)

@spec stats(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Find many image stats

Arguments

  • input - Input image

stats!(input)

@spec stats!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Find many image stats

Arguments

  • input - Input image

stdif(input, width, height, optional \\ [])

@spec stdif(Vix.Vips.Image.t(), integer(), integer(),
  a: float(),
  m0: float(),
  b: float(),
  s0: float()
) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Statistical difference

Arguments

  • input - Input image
  • width - Window width in pixels
  • height - Window height in pixels

Optional

  • a - Weight of new mean. Default: 0.5
  • m0 - New mean. Default: 128.0
  • b - Weight of new deviation. Default: 0.5
  • s0 - New deviation. Default: 50.0

stdif!(input, width, height, optional \\ [])

@spec stdif!(Vix.Vips.Image.t(), integer(), integer(),
  a: float(),
  m0: float(),
  b: float(),
  s0: float()
) ::
  Vix.Vips.Image.t() | no_return()

Statistical difference

Arguments

  • input - Input image
  • width - Window width in pixels
  • height - Window height in pixels

Optional

  • a - Weight of new mean. Default: 0.5
  • m0 - New mean. Default: 128.0
  • b - Weight of new deviation. Default: 0.5
  • s0 - New deviation. Default: 50.0

subsample(input, xfac, yfac, optional \\ [])

@spec subsample(Vix.Vips.Image.t(), integer(), integer(), [{:point, boolean()}]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Subsample an image

Arguments

  • input - Input image
  • xfac - Horizontal subsample factor
  • yfac - Vertical subsample factor

Optional

  • point - Point sample. Default: false

subsample!(input, xfac, yfac, optional \\ [])

@spec subsample!(Vix.Vips.Image.t(), integer(), integer(), [{:point, boolean()}]) ::
  Vix.Vips.Image.t() | no_return()

Subsample an image

Arguments

  • input - Input image
  • xfac - Horizontal subsample factor
  • yfac - Vertical subsample factor

Optional

  • point - Point sample. Default: false

subtract(left, right)

@spec subtract(Vix.Vips.Image.t(), Vix.Vips.Image.t()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Subtract two images

Arguments

  • left - Left-hand image argument
  • right - Right-hand image argument

subtract!(left, right)

Subtract two images

Arguments

  • left - Left-hand image argument
  • right - Right-hand image argument

sum(input)

@spec sum([Vix.Vips.Image.t()]) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Sum an array of images

Arguments

  • input - Array of input images

sum!(input)

@spec sum!([Vix.Vips.Image.t()]) :: Vix.Vips.Image.t() | no_return()

Sum an array of images

Arguments

  • input - Array of input images

svgload(filename, optional \\ [])

@spec svgload(String.t(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  unlimited: boolean(),
  scale: float(),
  dpi: float()
) ::
  {:ok, {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}}} | {:error, term()}

Load svg with rsvg

Arguments

  • filename - Filename to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • unlimited - Allow SVG of any size. Default: false
  • scale - Scale output by this factor. Default: 1.0
  • dpi - Render at this DPI. Default: 72.0

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

svgload!(filename, optional \\ [])

@spec svgload!(String.t(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  unlimited: boolean(),
  scale: float(),
  dpi: float()
) :: {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}} | no_return()

Load svg with rsvg

Arguments

  • filename - Filename to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • unlimited - Allow SVG of any size. Default: false
  • scale - Scale output by this factor. Default: 1.0
  • dpi - Render at this DPI. Default: 72.0

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

svgload_buffer(buffer, optional \\ [])

@spec svgload_buffer(binary(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  unlimited: boolean(),
  scale: float(),
  dpi: float()
) ::
  {:ok, {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}}} | {:error, term()}

Load svg with rsvg

Arguments

  • buffer - Buffer to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • unlimited - Allow SVG of any size. Default: false
  • scale - Scale output by this factor. Default: 1.0
  • dpi - Render at this DPI. Default: 72.0

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

svgload_buffer!(buffer, optional \\ [])

@spec svgload_buffer!(binary(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  unlimited: boolean(),
  scale: float(),
  dpi: float()
) :: {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}} | no_return()

Load svg with rsvg

Arguments

  • buffer - Buffer to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • unlimited - Allow SVG of any size. Default: false
  • scale - Scale output by this factor. Default: 1.0
  • dpi - Render at this DPI. Default: 72.0

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

switch(tests)

@spec switch([Vix.Vips.Image.t()]) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

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

Arguments

  • tests - Table of images to test

switch!(tests)

@spec switch!([Vix.Vips.Image.t()]) :: Vix.Vips.Image.t() | no_return()

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

Arguments

  • tests - Table of images to test

system(cmd-format, optional \\ [])

@spec system(String.t(),
  "in-format": String.t(),
  "out-format": String.t(),
  in: [Vix.Vips.Image.t()]
) ::
  {:ok, {%{log: String.t(), out: Vix.Vips.Image.t()}}} | {:error, term()}

Run an external command

Arguments

  • cmd-format - Command to run

Optional

  • in-format - Format for input filename. Default: nil
  • out-format - Format for output filename. Default: nil
  • in - Array of input images. Default: nil

Returns

Operation returns a tuple

Last value of the tuple is a map of additional output values as key-value pair.

  • log - Command log. (String.t())
  • out - Output image. (Vix.Vips.Image.t())

system!(cmd-format, optional \\ [])

@spec system!(String.t(),
  "in-format": String.t(),
  "out-format": String.t(),
  in: [Vix.Vips.Image.t()]
) ::
  {%{log: String.t(), out: Vix.Vips.Image.t()}} | no_return()

Run an external command

Arguments

  • cmd-format - Command to run

Optional

  • in-format - Format for input filename. Default: nil
  • out-format - Format for output filename. Default: nil
  • in - Array of input images. Default: nil

Returns

Operation returns a tuple

Last value of the tuple is a map of additional output values as key-value pair.

  • log - Command log. (String.t())
  • out - Output image. (Vix.Vips.Image.t())

text(text, optional \\ [])

@spec text(String.t(),
  wrap: vips_text_wrap(),
  rgba: boolean(),
  fontfile: String.t(),
  spacing: integer(),
  dpi: integer(),
  justify: boolean(),
  align: vips_align(),
  height: integer(),
  width: integer(),
  font: String.t()
) :: {:ok, {Vix.Vips.Image.t(), %{"autofit-dpi": integer()}}} | {:error, term()}

Make a text image

Arguments

  • text - Text to render

Optional

  • wrap - Wrap lines on word or character boundaries. Default: :VIPS_TEXT_WRAP_WORD
  • rgba - Enable RGBA output. Default: false
  • fontfile - Load this font file. Default: nil
  • spacing - Line spacing. Default: 0
  • dpi - DPI to render at. Default: 72
  • justify - Justify lines. Default: false
  • align - Align on the low, centre or high edge. Default: :VIPS_ALIGN_LOW
  • height - Maximum image height in pixels. Default: 0
  • width - Maximum image width in pixels. Default: 0
  • font - Font to render with. Default: nil

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • autofit-dpi - DPI selected by autofit. (integer())

text!(text, optional \\ [])

@spec text!(String.t(),
  wrap: vips_text_wrap(),
  rgba: boolean(),
  fontfile: String.t(),
  spacing: integer(),
  dpi: integer(),
  justify: boolean(),
  align: vips_align(),
  height: integer(),
  width: integer(),
  font: String.t()
) :: {Vix.Vips.Image.t(), %{"autofit-dpi": integer()}} | no_return()

Make a text image

Arguments

  • text - Text to render

Optional

  • wrap - Wrap lines on word or character boundaries. Default: :VIPS_TEXT_WRAP_WORD
  • rgba - Enable RGBA output. Default: false
  • fontfile - Load this font file. Default: nil
  • spacing - Line spacing. Default: 0
  • dpi - DPI to render at. Default: 72
  • justify - Justify lines. Default: false
  • align - Align on the low, centre or high edge. Default: :VIPS_ALIGN_LOW
  • height - Maximum image height in pixels. Default: 0
  • width - Maximum image width in pixels. Default: 0
  • font - Font to render with. Default: nil

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • autofit-dpi - DPI selected by autofit. (integer())

thumbnail(filename, width, optional \\ [])

@spec thumbnail(String.t(), integer(),
  "fail-on": vips_fail_on(),
  "auto-rotate": boolean(),
  intent: vips_intent(),
  "export-profile": String.t(),
  "import-profile": String.t(),
  linear: boolean(),
  crop: vips_interesting(),
  "no-rotate": boolean(),
  size: vips_size(),
  height: integer()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Generate thumbnail from file

Arguments

  • filename - Filename to read from
  • width - Size to this width

Optional

  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • auto-rotate - Use orientation tags to rotate image upright. Default: true
  • intent - Rendering intent. Default: :VIPS_INTENT_RELATIVE
  • export-profile - Fallback export profile. Default: nil
  • import-profile - Fallback import profile. Default: nil
  • linear - Reduce in linear light. Default: false
  • crop - Reduce to fill target rectangle, then crop. Default: :VIPS_INTERESTING_NONE
  • no-rotate - Don't use orientation tags to rotate image upright. Default: false
  • size - Only upsize, only downsize, or both. Default: :VIPS_SIZE_BOTH
  • height - Size to this height. Default: 1

thumbnail!(filename, width, optional \\ [])

@spec thumbnail!(String.t(), integer(),
  "fail-on": vips_fail_on(),
  "auto-rotate": boolean(),
  intent: vips_intent(),
  "export-profile": String.t(),
  "import-profile": String.t(),
  linear: boolean(),
  crop: vips_interesting(),
  "no-rotate": boolean(),
  size: vips_size(),
  height: integer()
) :: Vix.Vips.Image.t() | no_return()

Generate thumbnail from file

Arguments

  • filename - Filename to read from
  • width - Size to this width

Optional

  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • auto-rotate - Use orientation tags to rotate image upright. Default: true
  • intent - Rendering intent. Default: :VIPS_INTENT_RELATIVE
  • export-profile - Fallback export profile. Default: nil
  • import-profile - Fallback import profile. Default: nil
  • linear - Reduce in linear light. Default: false
  • crop - Reduce to fill target rectangle, then crop. Default: :VIPS_INTERESTING_NONE
  • no-rotate - Don't use orientation tags to rotate image upright. Default: false
  • size - Only upsize, only downsize, or both. Default: :VIPS_SIZE_BOTH
  • height - Size to this height. Default: 1

thumbnail_buffer(buffer, width, optional \\ [])

@spec thumbnail_buffer(binary(), integer(),
  "fail-on": vips_fail_on(),
  "auto-rotate": boolean(),
  intent: vips_intent(),
  "export-profile": String.t(),
  "import-profile": String.t(),
  linear: boolean(),
  crop: vips_interesting(),
  "no-rotate": boolean(),
  size: vips_size(),
  height: integer(),
  "option-string": String.t()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Generate thumbnail from buffer

Arguments

  • buffer - Buffer to load from
  • width - Size to this width

Optional

  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • auto-rotate - Use orientation tags to rotate image upright. Default: true
  • intent - Rendering intent. Default: :VIPS_INTENT_RELATIVE
  • export-profile - Fallback export profile. Default: nil
  • import-profile - Fallback import profile. Default: nil
  • linear - Reduce in linear light. Default: false
  • crop - Reduce to fill target rectangle, then crop. Default: :VIPS_INTERESTING_NONE
  • no-rotate - Don't use orientation tags to rotate image upright. Default: false
  • size - Only upsize, only downsize, or both. Default: :VIPS_SIZE_BOTH
  • height - Size to this height. Default: 1
  • option-string - Options that are passed on to the underlying loader. Default: ""

thumbnail_buffer!(buffer, width, optional \\ [])

@spec thumbnail_buffer!(binary(), integer(),
  "fail-on": vips_fail_on(),
  "auto-rotate": boolean(),
  intent: vips_intent(),
  "export-profile": String.t(),
  "import-profile": String.t(),
  linear: boolean(),
  crop: vips_interesting(),
  "no-rotate": boolean(),
  size: vips_size(),
  height: integer(),
  "option-string": String.t()
) :: Vix.Vips.Image.t() | no_return()

Generate thumbnail from buffer

Arguments

  • buffer - Buffer to load from
  • width - Size to this width

Optional

  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • auto-rotate - Use orientation tags to rotate image upright. Default: true
  • intent - Rendering intent. Default: :VIPS_INTENT_RELATIVE
  • export-profile - Fallback export profile. Default: nil
  • import-profile - Fallback import profile. Default: nil
  • linear - Reduce in linear light. Default: false
  • crop - Reduce to fill target rectangle, then crop. Default: :VIPS_INTERESTING_NONE
  • no-rotate - Don't use orientation tags to rotate image upright. Default: false
  • size - Only upsize, only downsize, or both. Default: :VIPS_SIZE_BOTH
  • height - Size to this height. Default: 1
  • option-string - Options that are passed on to the underlying loader. Default: ""

thumbnail_image(input, width, optional \\ [])

@spec thumbnail_image(Vix.Vips.Image.t(), integer(),
  "fail-on": vips_fail_on(),
  "auto-rotate": boolean(),
  intent: vips_intent(),
  "export-profile": String.t(),
  "import-profile": String.t(),
  linear: boolean(),
  crop: vips_interesting(),
  "no-rotate": boolean(),
  size: vips_size(),
  height: integer()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Generate thumbnail from image

Arguments

  • input - Input image argument
  • width - Size to this width

Optional

  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • auto-rotate - Use orientation tags to rotate image upright. Default: true
  • intent - Rendering intent. Default: :VIPS_INTENT_RELATIVE
  • export-profile - Fallback export profile. Default: nil
  • import-profile - Fallback import profile. Default: nil
  • linear - Reduce in linear light. Default: false
  • crop - Reduce to fill target rectangle, then crop. Default: :VIPS_INTERESTING_NONE
  • no-rotate - Don't use orientation tags to rotate image upright. Default: false
  • size - Only upsize, only downsize, or both. Default: :VIPS_SIZE_BOTH
  • height - Size to this height. Default: 1

thumbnail_image!(input, width, optional \\ [])

@spec thumbnail_image!(Vix.Vips.Image.t(), integer(),
  "fail-on": vips_fail_on(),
  "auto-rotate": boolean(),
  intent: vips_intent(),
  "export-profile": String.t(),
  "import-profile": String.t(),
  linear: boolean(),
  crop: vips_interesting(),
  "no-rotate": boolean(),
  size: vips_size(),
  height: integer()
) :: Vix.Vips.Image.t() | no_return()

Generate thumbnail from image

Arguments

  • input - Input image argument
  • width - Size to this width

Optional

  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • auto-rotate - Use orientation tags to rotate image upright. Default: true
  • intent - Rendering intent. Default: :VIPS_INTENT_RELATIVE
  • export-profile - Fallback export profile. Default: nil
  • import-profile - Fallback import profile. Default: nil
  • linear - Reduce in linear light. Default: false
  • crop - Reduce to fill target rectangle, then crop. Default: :VIPS_INTERESTING_NONE
  • no-rotate - Don't use orientation tags to rotate image upright. Default: false
  • size - Only upsize, only downsize, or both. Default: :VIPS_SIZE_BOTH
  • height - Size to this height. Default: 1

tiffload(filename, optional \\ [])

@spec tiffload(String.t(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  autorotate: boolean(),
  n: integer(),
  subifd: integer(),
  page: integer()
) ::
  {:ok, {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}}} | {:error, term()}

Load tiff from file

Arguments

  • filename - Filename to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • autorotate - Rotate image using orientation tag. Default: false
  • n - Number of pages to load, -1 for all. Default: 1
  • subifd - Subifd index. Default: -1
  • page - First page to load. Default: 0

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

tiffload!(filename, optional \\ [])

@spec tiffload!(String.t(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  autorotate: boolean(),
  n: integer(),
  subifd: integer(),
  page: integer()
) :: {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}} | no_return()

Load tiff from file

Arguments

  • filename - Filename to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • autorotate - Rotate image using orientation tag. Default: false
  • n - Number of pages to load, -1 for all. Default: 1
  • subifd - Subifd index. Default: -1
  • page - First page to load. Default: 0

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

tiffload_buffer(buffer, optional \\ [])

@spec tiffload_buffer(binary(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  autorotate: boolean(),
  n: integer(),
  subifd: integer(),
  page: integer()
) ::
  {:ok, {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}}} | {:error, term()}

Load tiff from buffer

Arguments

  • buffer - Buffer to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • autorotate - Rotate image using orientation tag. Default: false
  • n - Number of pages to load, -1 for all. Default: 1
  • subifd - Subifd index. Default: -1
  • page - First page to load. Default: 0

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

tiffload_buffer!(buffer, optional \\ [])

@spec tiffload_buffer!(binary(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  autorotate: boolean(),
  n: integer(),
  subifd: integer(),
  page: integer()
) :: {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}} | no_return()

Load tiff from buffer

Arguments

  • buffer - Buffer to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • autorotate - Rotate image using orientation tag. Default: false
  • n - Number of pages to load, -1 for all. Default: 1
  • subifd - Subifd index. Default: -1
  • page - First page to load. Default: 0

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

tiffsave(input, filename, optional \\ [])

@spec tiffsave(Vix.Vips.Image.t(), String.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  squash: boolean(),
  rgbjpeg: boolean(),
  premultiply: boolean(),
  subifd: boolean(),
  depth: vips_foreign_dz_depth(),
  lossless: boolean(),
  level: integer(),
  "region-shrink": vips_region_shrink(),
  properties: boolean(),
  bigtiff: boolean(),
  yres: float(),
  xres: float(),
  resunit: vips_foreign_tiff_resunit(),
  bitdepth: integer(),
  miniswhite: boolean(),
  pyramid: boolean(),
  "tile-height": integer(),
  "tile-width": integer(),
  tile: boolean(),
  predictor: vips_foreign_tiff_predictor(),
  Q: integer(),
  compression: vips_foreign_tiff_compression()
) :: :ok | {:error, term()}

Save image to tiff file

Arguments

  • input - Image to save
  • filename - Filename to save to

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • squash - Squash images down to 1 bit. Default: false
  • rgbjpeg - Output RGB JPEG rather than YCbCr. Default: false
  • premultiply - Save with premultiplied alpha. Default: false
  • subifd - Save pyr layers as sub-IFDs. Default: false
  • depth - Pyramid depth. Default: :VIPS_FOREIGN_DZ_DEPTH_ONETILE
  • lossless - Enable WEBP lossless mode. Default: false
  • level - ZSTD compression level. Default: 10
  • region-shrink - Method to shrink regions. Default: :VIPS_REGION_SHRINK_MEAN
  • properties - Write a properties document to IMAGEDESCRIPTION. Default: false
  • bigtiff - Write a bigtiff image. Default: false
  • yres - Vertical resolution in pixels/mm. Default: 1.0
  • xres - Horizontal resolution in pixels/mm. Default: 1.0
  • resunit - Resolution unit. Default: :VIPS_FOREIGN_TIFF_RESUNIT_CM
  • bitdepth - Write as a 1, 2, 4 or 8 bit image. Default: 0
  • miniswhite - Use 0 for white in 1-bit images. Default: false
  • pyramid - Write a pyramidal tiff. Default: false
  • tile-height - Tile height in pixels. Default: 128
  • tile-width - Tile width in pixels. Default: 128
  • tile - Write a tiled tiff. Default: false
  • predictor - Compression prediction. Default: :VIPS_FOREIGN_TIFF_PREDICTOR_HORIZONTAL
  • Q - Q factor. Default: 75
  • compression - Compression for this file. Default: :VIPS_FOREIGN_TIFF_COMPRESSION_NONE

tiffsave!(input, filename, optional \\ [])

@spec tiffsave!(Vix.Vips.Image.t(), String.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  squash: boolean(),
  rgbjpeg: boolean(),
  premultiply: boolean(),
  subifd: boolean(),
  depth: vips_foreign_dz_depth(),
  lossless: boolean(),
  level: integer(),
  "region-shrink": vips_region_shrink(),
  properties: boolean(),
  bigtiff: boolean(),
  yres: float(),
  xres: float(),
  resunit: vips_foreign_tiff_resunit(),
  bitdepth: integer(),
  miniswhite: boolean(),
  pyramid: boolean(),
  "tile-height": integer(),
  "tile-width": integer(),
  tile: boolean(),
  predictor: vips_foreign_tiff_predictor(),
  Q: integer(),
  compression: vips_foreign_tiff_compression()
) :: :ok | no_return()

Save image to tiff file

Arguments

  • input - Image to save
  • filename - Filename to save to

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • squash - Squash images down to 1 bit. Default: false
  • rgbjpeg - Output RGB JPEG rather than YCbCr. Default: false
  • premultiply - Save with premultiplied alpha. Default: false
  • subifd - Save pyr layers as sub-IFDs. Default: false
  • depth - Pyramid depth. Default: :VIPS_FOREIGN_DZ_DEPTH_ONETILE
  • lossless - Enable WEBP lossless mode. Default: false
  • level - ZSTD compression level. Default: 10
  • region-shrink - Method to shrink regions. Default: :VIPS_REGION_SHRINK_MEAN
  • properties - Write a properties document to IMAGEDESCRIPTION. Default: false
  • bigtiff - Write a bigtiff image. Default: false
  • yres - Vertical resolution in pixels/mm. Default: 1.0
  • xres - Horizontal resolution in pixels/mm. Default: 1.0
  • resunit - Resolution unit. Default: :VIPS_FOREIGN_TIFF_RESUNIT_CM
  • bitdepth - Write as a 1, 2, 4 or 8 bit image. Default: 0
  • miniswhite - Use 0 for white in 1-bit images. Default: false
  • pyramid - Write a pyramidal tiff. Default: false
  • tile-height - Tile height in pixels. Default: 128
  • tile-width - Tile width in pixels. Default: 128
  • tile - Write a tiled tiff. Default: false
  • predictor - Compression prediction. Default: :VIPS_FOREIGN_TIFF_PREDICTOR_HORIZONTAL
  • Q - Q factor. Default: 75
  • compression - Compression for this file. Default: :VIPS_FOREIGN_TIFF_COMPRESSION_NONE

tiffsave_buffer(input, optional \\ [])

@spec tiffsave_buffer(Vix.Vips.Image.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  squash: boolean(),
  rgbjpeg: boolean(),
  premultiply: boolean(),
  subifd: boolean(),
  depth: vips_foreign_dz_depth(),
  lossless: boolean(),
  level: integer(),
  "region-shrink": vips_region_shrink(),
  properties: boolean(),
  bigtiff: boolean(),
  yres: float(),
  xres: float(),
  resunit: vips_foreign_tiff_resunit(),
  bitdepth: integer(),
  miniswhite: boolean(),
  pyramid: boolean(),
  "tile-height": integer(),
  "tile-width": integer(),
  tile: boolean(),
  predictor: vips_foreign_tiff_predictor(),
  Q: integer(),
  compression: vips_foreign_tiff_compression()
) :: {:ok, binary()} | {:error, term()}

Save image to tiff buffer

Arguments

  • input - Image to save

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • squash - Squash images down to 1 bit. Default: false
  • rgbjpeg - Output RGB JPEG rather than YCbCr. Default: false
  • premultiply - Save with premultiplied alpha. Default: false
  • subifd - Save pyr layers as sub-IFDs. Default: false
  • depth - Pyramid depth. Default: :VIPS_FOREIGN_DZ_DEPTH_ONETILE
  • lossless - Enable WEBP lossless mode. Default: false
  • level - ZSTD compression level. Default: 10
  • region-shrink - Method to shrink regions. Default: :VIPS_REGION_SHRINK_MEAN
  • properties - Write a properties document to IMAGEDESCRIPTION. Default: false
  • bigtiff - Write a bigtiff image. Default: false
  • yres - Vertical resolution in pixels/mm. Default: 1.0
  • xres - Horizontal resolution in pixels/mm. Default: 1.0
  • resunit - Resolution unit. Default: :VIPS_FOREIGN_TIFF_RESUNIT_CM
  • bitdepth - Write as a 1, 2, 4 or 8 bit image. Default: 0
  • miniswhite - Use 0 for white in 1-bit images. Default: false
  • pyramid - Write a pyramidal tiff. Default: false
  • tile-height - Tile height in pixels. Default: 128
  • tile-width - Tile width in pixels. Default: 128
  • tile - Write a tiled tiff. Default: false
  • predictor - Compression prediction. Default: :VIPS_FOREIGN_TIFF_PREDICTOR_HORIZONTAL
  • Q - Q factor. Default: 75
  • compression - Compression for this file. Default: :VIPS_FOREIGN_TIFF_COMPRESSION_NONE

tiffsave_buffer!(input, optional \\ [])

@spec tiffsave_buffer!(Vix.Vips.Image.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  squash: boolean(),
  rgbjpeg: boolean(),
  premultiply: boolean(),
  subifd: boolean(),
  depth: vips_foreign_dz_depth(),
  lossless: boolean(),
  level: integer(),
  "region-shrink": vips_region_shrink(),
  properties: boolean(),
  bigtiff: boolean(),
  yres: float(),
  xres: float(),
  resunit: vips_foreign_tiff_resunit(),
  bitdepth: integer(),
  miniswhite: boolean(),
  pyramid: boolean(),
  "tile-height": integer(),
  "tile-width": integer(),
  tile: boolean(),
  predictor: vips_foreign_tiff_predictor(),
  Q: integer(),
  compression: vips_foreign_tiff_compression()
) :: binary() | no_return()

Save image to tiff buffer

Arguments

  • input - Image to save

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • squash - Squash images down to 1 bit. Default: false
  • rgbjpeg - Output RGB JPEG rather than YCbCr. Default: false
  • premultiply - Save with premultiplied alpha. Default: false
  • subifd - Save pyr layers as sub-IFDs. Default: false
  • depth - Pyramid depth. Default: :VIPS_FOREIGN_DZ_DEPTH_ONETILE
  • lossless - Enable WEBP lossless mode. Default: false
  • level - ZSTD compression level. Default: 10
  • region-shrink - Method to shrink regions. Default: :VIPS_REGION_SHRINK_MEAN
  • properties - Write a properties document to IMAGEDESCRIPTION. Default: false
  • bigtiff - Write a bigtiff image. Default: false
  • yres - Vertical resolution in pixels/mm. Default: 1.0
  • xres - Horizontal resolution in pixels/mm. Default: 1.0
  • resunit - Resolution unit. Default: :VIPS_FOREIGN_TIFF_RESUNIT_CM
  • bitdepth - Write as a 1, 2, 4 or 8 bit image. Default: 0
  • miniswhite - Use 0 for white in 1-bit images. Default: false
  • pyramid - Write a pyramidal tiff. Default: false
  • tile-height - Tile height in pixels. Default: 128
  • tile-width - Tile width in pixels. Default: 128
  • tile - Write a tiled tiff. Default: false
  • predictor - Compression prediction. Default: :VIPS_FOREIGN_TIFF_PREDICTOR_HORIZONTAL
  • Q - Q factor. Default: 75
  • compression - Compression for this file. Default: :VIPS_FOREIGN_TIFF_COMPRESSION_NONE

tilecache(input, optional \\ [])

@spec tilecache(Vix.Vips.Image.t(),
  persistent: boolean(),
  threaded: boolean(),
  access: vips_access(),
  "max-tiles": integer(),
  "tile-height": integer(),
  "tile-width": integer()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Cache an image as a set of tiles

Arguments

  • input - Input image

Optional

  • persistent - Keep cache between evaluations. Default: false
  • threaded - Allow threaded access. Default: false
  • access - Expected access pattern. Default: :VIPS_ACCESS_RANDOM
  • max-tiles - Maximum number of tiles to cache. Default: 1000
  • tile-height - Tile height in pixels. Default: 128
  • tile-width - Tile width in pixels. Default: 128

tilecache!(input, optional \\ [])

@spec tilecache!(Vix.Vips.Image.t(),
  persistent: boolean(),
  threaded: boolean(),
  access: vips_access(),
  "max-tiles": integer(),
  "tile-height": integer(),
  "tile-width": integer()
) :: Vix.Vips.Image.t() | no_return()

Cache an image as a set of tiles

Arguments

  • input - Input image

Optional

  • persistent - Keep cache between evaluations. Default: false
  • threaded - Allow threaded access. Default: false
  • access - Expected access pattern. Default: :VIPS_ACCESS_RANDOM
  • max-tiles - Maximum number of tiles to cache. Default: 1000
  • tile-height - Tile height in pixels. Default: 128
  • tile-width - Tile width in pixels. Default: 128

tonelut(optional \\ [])

@spec tonelut(
  H: float(),
  M: float(),
  S: float(),
  Ph: float(),
  Pm: float(),
  Ps: float(),
  Lw: float(),
  Lb: float(),
  "out-max": integer(),
  "in-max": integer()
) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Build a look-up table

Arguments

Optional

  • H - Adjust highlights by this much. Default: 0.0
  • M - Adjust mid-tones by this much. Default: 0.0
  • S - Adjust shadows by this much. Default: 0.0
  • Ph - Position of highlights. Default: 0.8
  • Pm - Position of mid-tones. Default: 0.5
  • Ps - Position of shadow. Default: 0.2
  • Lw - Highest value in output. Default: 100.0
  • Lb - Lowest value in output. Default: 0.0
  • out-max - Maximum value in output LUT. Default: 32767
  • in-max - Size of LUT to build. Default: 32767

tonelut!(optional \\ [])

@spec tonelut!(
  H: float(),
  M: float(),
  S: float(),
  Ph: float(),
  Pm: float(),
  Ps: float(),
  Lw: float(),
  Lb: float(),
  "out-max": integer(),
  "in-max": integer()
) :: Vix.Vips.Image.t() | no_return()

Build a look-up table

Arguments

Optional

  • H - Adjust highlights by this much. Default: 0.0
  • M - Adjust mid-tones by this much. Default: 0.0
  • S - Adjust shadows by this much. Default: 0.0
  • Ph - Position of highlights. Default: 0.8
  • Pm - Position of mid-tones. Default: 0.5
  • Ps - Position of shadow. Default: 0.2
  • Lw - Highest value in output. Default: 100.0
  • Lb - Lowest value in output. Default: 0.0
  • out-max - Maximum value in output LUT. Default: 32767
  • in-max - Size of LUT to build. Default: 32767

transpose3d(input, optional \\ [])

@spec transpose3d(Vix.Vips.Image.t(), [{:"page-height", integer()}]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Transpose3d an image

Arguments

  • input - Input image

Optional

  • page-height - Height of each input page. Default: 0

transpose3d!(input, optional \\ [])

@spec transpose3d!(Vix.Vips.Image.t(), [{:"page-height", integer()}]) ::
  Vix.Vips.Image.t() | no_return()

Transpose3d an image

Arguments

  • input - Input image

Optional

  • page-height - Height of each input page. Default: 0

unpremultiply(input, optional \\ [])

@spec unpremultiply(Vix.Vips.Image.t(), "alpha-band": integer(), "max-alpha": float()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Unpremultiply image alpha

Arguments

  • input - Input image

Optional

  • alpha-band - Unpremultiply with this alpha. Default: 3
  • max-alpha - Maximum value of alpha channel. Default: 255.0

unpremultiply!(input, optional \\ [])

@spec unpremultiply!(Vix.Vips.Image.t(),
  "alpha-band": integer(),
  "max-alpha": float()
) ::
  Vix.Vips.Image.t() | no_return()

Unpremultiply image alpha

Arguments

  • input - Input image

Optional

  • alpha-band - Unpremultiply with this alpha. Default: 3
  • max-alpha - Maximum value of alpha channel. Default: 255.0

vipsload(filename, optional \\ [])

@spec vipsload(String.t(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean()
) ::
  {:ok, {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}}} | {:error, term()}

Load vips from file

Arguments

  • filename - Filename to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

vipsload!(filename, optional \\ [])

@spec vipsload!(String.t(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean()
) :: {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}} | no_return()

Load vips from file

Arguments

  • filename - Filename to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

vipssave(input, filename, optional \\ [])

@spec vipssave(Vix.Vips.Image.t(), String.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep()
) :: :ok | {:error, term()}

Save image to file in vips format

Arguments

  • input - Image to save
  • filename - Filename to save to

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]

vipssave!(input, filename, optional \\ [])

@spec vipssave!(Vix.Vips.Image.t(), String.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep()
) :: :ok | no_return()

Save image to file in vips format

Arguments

  • input - Image to save
  • filename - Filename to save to

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]

webpload(filename, optional \\ [])

@spec webpload(String.t(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  shrink: integer(),
  scale: float(),
  n: integer(),
  page: integer()
) ::
  {:ok, {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}}} | {:error, term()}

Load webp from file

Arguments

  • filename - Filename to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • shrink - Shrink factor on load. Default: 1
  • scale - Factor to scale by. Default: 1.0
  • n - Number of pages to load, -1 for all. Default: 1
  • page - First page to load. Default: 0

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

webpload!(filename, optional \\ [])

@spec webpload!(String.t(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  shrink: integer(),
  scale: float(),
  n: integer(),
  page: integer()
) :: {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}} | no_return()

Load webp from file

Arguments

  • filename - Filename to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • shrink - Shrink factor on load. Default: 1
  • scale - Factor to scale by. Default: 1.0
  • n - Number of pages to load, -1 for all. Default: 1
  • page - First page to load. Default: 0

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

webpload_buffer(buffer, optional \\ [])

@spec webpload_buffer(binary(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  shrink: integer(),
  scale: float(),
  n: integer(),
  page: integer()
) ::
  {:ok, {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}}} | {:error, term()}

Load webp from buffer

Arguments

  • buffer - Buffer to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • shrink - Shrink factor on load. Default: 1
  • scale - Factor to scale by. Default: 1.0
  • n - Number of pages to load, -1 for all. Default: 1
  • page - First page to load. Default: 0

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

webpload_buffer!(buffer, optional \\ [])

@spec webpload_buffer!(binary(),
  disc: boolean(),
  fail: boolean(),
  sequential: boolean(),
  revalidate: boolean(),
  "fail-on": vips_fail_on(),
  access: vips_access(),
  memory: boolean(),
  shrink: integer(),
  scale: float(),
  n: integer(),
  page: integer()
) :: {Vix.Vips.Image.t(), %{flags: vips_foreign_flags()}} | no_return()

Load webp from buffer

Arguments

  • buffer - Buffer to load from

Optional

  • disc - Open to disc. Default: true
  • fail - Fail on first warning. Default: false
  • sequential - Sequential read only. Default: false
  • revalidate - Don't use a cached result for this operation. Default: false
  • fail-on - Error level to fail on. Default: :VIPS_FAIL_ON_NONE
  • access - Required access pattern for this file. Default: :VIPS_ACCESS_RANDOM
  • memory - Force open via memory. Default: false
  • shrink - Shrink factor on load. Default: 1
  • scale - Factor to scale by. Default: 1.0
  • n - Number of pages to load, -1 for all. Default: 1
  • page - First page to load. Default: 0

Returns

Operation returns a tuple

  • out - Output image. (Vix.Vips.Image.t())

Last value of the tuple is a map of additional output values as key-value pair.

  • flags - Flags for this file. (vips_foreign_flags)

webpsave(input, filename, optional \\ [])

@spec webpsave(Vix.Vips.Image.t(), String.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  mixed: boolean(),
  "reduction-effort": integer(),
  effort: integer(),
  kmax: integer(),
  kmin: integer(),
  "min-size": boolean(),
  "alpha-q": integer(),
  "near-lossless": boolean(),
  "smart-subsample": boolean(),
  preset: vips_foreign_webp_preset(),
  lossless: boolean(),
  Q: integer()
) :: :ok | {:error, term()}

Save as webp

Arguments

  • input - Image to save
  • filename - Filename to save to

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • mixed - Allow mixed encoding (might reduce file size). Default: false
  • reduction-effort - Level of CPU effort to reduce file size. Default: 4
  • effort - Level of CPU effort to reduce file size. Default: 4
  • kmax - Maximum number of frames between key frames. Default: 2147483647
  • kmin - Minimum number of frames between key frames. Default: 2147483646
  • min-size - Optimise for minimum size. Default: false
  • alpha-q - Change alpha plane fidelity for lossy compression. Default: 100
  • near-lossless - Enable preprocessing in lossless mode (uses Q). Default: false
  • smart-subsample - Enable high quality chroma subsampling. Default: false
  • preset - Preset for lossy compression. Default: :VIPS_FOREIGN_WEBP_PRESET_DEFAULT
  • lossless - Enable lossless compression. Default: false
  • Q - Q factor. Default: 75

webpsave!(input, filename, optional \\ [])

@spec webpsave!(Vix.Vips.Image.t(), String.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  mixed: boolean(),
  "reduction-effort": integer(),
  effort: integer(),
  kmax: integer(),
  kmin: integer(),
  "min-size": boolean(),
  "alpha-q": integer(),
  "near-lossless": boolean(),
  "smart-subsample": boolean(),
  preset: vips_foreign_webp_preset(),
  lossless: boolean(),
  Q: integer()
) :: :ok | no_return()

Save as webp

Arguments

  • input - Image to save
  • filename - Filename to save to

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • mixed - Allow mixed encoding (might reduce file size). Default: false
  • reduction-effort - Level of CPU effort to reduce file size. Default: 4
  • effort - Level of CPU effort to reduce file size. Default: 4
  • kmax - Maximum number of frames between key frames. Default: 2147483647
  • kmin - Minimum number of frames between key frames. Default: 2147483646
  • min-size - Optimise for minimum size. Default: false
  • alpha-q - Change alpha plane fidelity for lossy compression. Default: 100
  • near-lossless - Enable preprocessing in lossless mode (uses Q). Default: false
  • smart-subsample - Enable high quality chroma subsampling. Default: false
  • preset - Preset for lossy compression. Default: :VIPS_FOREIGN_WEBP_PRESET_DEFAULT
  • lossless - Enable lossless compression. Default: false
  • Q - Q factor. Default: 75

webpsave_buffer(input, optional \\ [])

@spec webpsave_buffer(Vix.Vips.Image.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  mixed: boolean(),
  "reduction-effort": integer(),
  effort: integer(),
  kmax: integer(),
  kmin: integer(),
  "min-size": boolean(),
  "alpha-q": integer(),
  "near-lossless": boolean(),
  "smart-subsample": boolean(),
  preset: vips_foreign_webp_preset(),
  lossless: boolean(),
  Q: integer()
) :: {:ok, binary()} | {:error, term()}

Save as webp

Arguments

  • input - Image to save

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • mixed - Allow mixed encoding (might reduce file size). Default: false
  • reduction-effort - Level of CPU effort to reduce file size. Default: 4
  • effort - Level of CPU effort to reduce file size. Default: 4
  • kmax - Maximum number of frames between key frames. Default: 2147483647
  • kmin - Minimum number of frames between key frames. Default: 2147483646
  • min-size - Optimise for minimum size. Default: false
  • alpha-q - Change alpha plane fidelity for lossy compression. Default: 100
  • near-lossless - Enable preprocessing in lossless mode (uses Q). Default: false
  • smart-subsample - Enable high quality chroma subsampling. Default: false
  • preset - Preset for lossy compression. Default: :VIPS_FOREIGN_WEBP_PRESET_DEFAULT
  • lossless - Enable lossless compression. Default: false
  • Q - Q factor. Default: 75

webpsave_buffer!(input, optional \\ [])

@spec webpsave_buffer!(Vix.Vips.Image.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  mixed: boolean(),
  "reduction-effort": integer(),
  effort: integer(),
  kmax: integer(),
  kmin: integer(),
  "min-size": boolean(),
  "alpha-q": integer(),
  "near-lossless": boolean(),
  "smart-subsample": boolean(),
  preset: vips_foreign_webp_preset(),
  lossless: boolean(),
  Q: integer()
) :: binary() | no_return()

Save as webp

Arguments

  • input - Image to save

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • mixed - Allow mixed encoding (might reduce file size). Default: false
  • reduction-effort - Level of CPU effort to reduce file size. Default: 4
  • effort - Level of CPU effort to reduce file size. Default: 4
  • kmax - Maximum number of frames between key frames. Default: 2147483647
  • kmin - Minimum number of frames between key frames. Default: 2147483646
  • min-size - Optimise for minimum size. Default: false
  • alpha-q - Change alpha plane fidelity for lossy compression. Default: 100
  • near-lossless - Enable preprocessing in lossless mode (uses Q). Default: false
  • smart-subsample - Enable high quality chroma subsampling. Default: false
  • preset - Preset for lossy compression. Default: :VIPS_FOREIGN_WEBP_PRESET_DEFAULT
  • lossless - Enable lossless compression. Default: false
  • Q - Q factor. Default: 75

webpsave_mime(input, optional \\ [])

@spec webpsave_mime(Vix.Vips.Image.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  mixed: boolean(),
  "reduction-effort": integer(),
  effort: integer(),
  kmax: integer(),
  kmin: integer(),
  "min-size": boolean(),
  "alpha-q": integer(),
  "near-lossless": boolean(),
  "smart-subsample": boolean(),
  preset: vips_foreign_webp_preset(),
  lossless: boolean(),
  Q: integer()
) :: :ok | {:error, term()}

Save image to webp mime

Arguments

  • input - Image to save

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • mixed - Allow mixed encoding (might reduce file size). Default: false
  • reduction-effort - Level of CPU effort to reduce file size. Default: 4
  • effort - Level of CPU effort to reduce file size. Default: 4
  • kmax - Maximum number of frames between key frames. Default: 2147483647
  • kmin - Minimum number of frames between key frames. Default: 2147483646
  • min-size - Optimise for minimum size. Default: false
  • alpha-q - Change alpha plane fidelity for lossy compression. Default: 100
  • near-lossless - Enable preprocessing in lossless mode (uses Q). Default: false
  • smart-subsample - Enable high quality chroma subsampling. Default: false
  • preset - Preset for lossy compression. Default: :VIPS_FOREIGN_WEBP_PRESET_DEFAULT
  • lossless - Enable lossless compression. Default: false
  • Q - Q factor. Default: 75

webpsave_mime!(input, optional \\ [])

@spec webpsave_mime!(Vix.Vips.Image.t(),
  strip: boolean(),
  profile: String.t(),
  "page-height": integer(),
  background: [float()],
  keep: vips_foreign_keep(),
  mixed: boolean(),
  "reduction-effort": integer(),
  effort: integer(),
  kmax: integer(),
  kmin: integer(),
  "min-size": boolean(),
  "alpha-q": integer(),
  "near-lossless": boolean(),
  "smart-subsample": boolean(),
  preset: vips_foreign_webp_preset(),
  lossless: boolean(),
  Q: integer()
) :: :ok | no_return()

Save image to webp mime

Arguments

  • input - Image to save

Optional

  • strip - Strip all metadata from image. Default: false
  • profile - Filename of ICC profile to embed. Default: nil
  • page-height - Set page height for multipage save. Default: 0
  • background - Background value. Default: nil
  • keep - Which metadata to retain. Default: [:VIPS_FOREIGN_KEEP_OTHER, :VIPS_FOREIGN_KEEP_ICC, :VIPS_FOREIGN_KEEP_IPTC, :VIPS_FOREIGN_KEEP_XMP, :VIPS_FOREIGN_KEEP_EXIF]
  • mixed - Allow mixed encoding (might reduce file size). Default: false
  • reduction-effort - Level of CPU effort to reduce file size. Default: 4
  • effort - Level of CPU effort to reduce file size. Default: 4
  • kmax - Maximum number of frames between key frames. Default: 2147483647
  • kmin - Minimum number of frames between key frames. Default: 2147483646
  • min-size - Optimise for minimum size. Default: false
  • alpha-q - Change alpha plane fidelity for lossy compression. Default: 100
  • near-lossless - Enable preprocessing in lossless mode (uses Q). Default: false
  • smart-subsample - Enable high quality chroma subsampling. Default: false
  • preset - Preset for lossy compression. Default: :VIPS_FOREIGN_WEBP_PRESET_DEFAULT
  • lossless - Enable lossless compression. Default: false
  • Q - Q factor. Default: 75

worley(width, height, optional \\ [])

@spec worley(integer(), integer(), seed: integer(), "cell-size": integer()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Make a worley noise image

Arguments

  • width - Image width in pixels
  • height - Image height in pixels

Optional

  • seed - Random number seed. Default: 0
  • cell-size - Size of Worley cells. Default: 256

worley!(width, height, optional \\ [])

@spec worley!(integer(), integer(), seed: integer(), "cell-size": integer()) ::
  Vix.Vips.Image.t() | no_return()

Make a worley noise image

Arguments

  • width - Image width in pixels
  • height - Image height in pixels

Optional

  • seed - Random number seed. Default: 0
  • cell-size - Size of Worley cells. Default: 256

wrap(input, optional \\ [])

@spec wrap(Vix.Vips.Image.t(), y: integer(), x: integer()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Wrap image origin

Arguments

  • input - Input image

Optional

  • y - Top edge of input in output. Default: 0
  • x - Left edge of input in output. Default: 0

wrap!(input, optional \\ [])

@spec wrap!(Vix.Vips.Image.t(), y: integer(), x: integer()) ::
  Vix.Vips.Image.t() | no_return()

Wrap image origin

Arguments

  • input - Input image

Optional

  • y - Top edge of input in output. Default: 0
  • x - Left edge of input in output. Default: 0

xyz2cmyk(input)

@spec xyz2cmyk(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Transform xyz to cmyk

Arguments

  • input - Input image

xyz2cmyk!(input)

@spec xyz2cmyk!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Transform xyz to cmyk

Arguments

  • input - Input image

xyz2lab(input, optional \\ [])

@spec xyz2lab(Vix.Vips.Image.t(), [{:temp, [float()]}]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Transform xyz to lab

Arguments

  • input - Input image

Optional

  • temp - Colour temperature. Default: nil

xyz2lab!(input, optional \\ [])

@spec xyz2lab!(Vix.Vips.Image.t(), [{:temp, [float()]}]) ::
  Vix.Vips.Image.t() | no_return()

Transform xyz to lab

Arguments

  • input - Input image

Optional

  • temp - Colour temperature. Default: nil

xyz2scrgb(input)

@spec xyz2scrgb(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Transform xyz to scrgb

Arguments

  • input - Input image

xyz2scrgb!(input)

@spec xyz2scrgb!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Transform xyz to scrgb

Arguments

  • input - Input image

xyz2yxy(input)

@spec xyz2yxy(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Transform xyz to yxy

Arguments

  • input - Input image

xyz2yxy!(input)

@spec xyz2yxy!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Transform xyz to yxy

Arguments

  • input - Input image

xyz(width, height, optional \\ [])

@spec xyz(integer(), integer(), esize: integer(), dsize: integer(), csize: integer()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Make an image where pixel values are coordinates

Arguments

  • width - Image width in pixels
  • height - Image height in pixels

Optional

  • esize - Size of fifth dimension. Default: 1
  • dsize - Size of fourth dimension. Default: 1
  • csize - Size of third dimension. Default: 1

xyz!(width, height, optional \\ [])

@spec xyz!(integer(), integer(), esize: integer(), dsize: integer(), csize: integer()) ::
  Vix.Vips.Image.t() | no_return()

Make an image where pixel values are coordinates

Arguments

  • width - Image width in pixels
  • height - Image height in pixels

Optional

  • esize - Size of fifth dimension. Default: 1
  • dsize - Size of fourth dimension. Default: 1
  • csize - Size of third dimension. Default: 1

yxy2xyz(input)

@spec yxy2xyz(Vix.Vips.Image.t()) :: {:ok, Vix.Vips.Image.t()} | {:error, term()}

Transform yxy to xyz

Arguments

  • input - Input image

yxy2xyz!(input)

@spec yxy2xyz!(Vix.Vips.Image.t()) :: Vix.Vips.Image.t() | no_return()

Transform yxy to xyz

Arguments

  • input - Input image

zone(width, height, optional \\ [])

@spec zone(integer(), integer(), [{:uchar, boolean()}]) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Make a zone plate

Arguments

  • width - Image width in pixels
  • height - Image height in pixels

Optional

  • uchar - Output an unsigned char image. Default: false

zone!(width, height, optional \\ [])

@spec zone!(integer(), integer(), [{:uchar, boolean()}]) ::
  Vix.Vips.Image.t() | no_return()

Make a zone plate

Arguments

  • width - Image width in pixels
  • height - Image height in pixels

Optional

  • uchar - Output an unsigned char image. Default: false

zoom(input, xfac, yfac)

@spec zoom(Vix.Vips.Image.t(), integer(), integer()) ::
  {:ok, Vix.Vips.Image.t()} | {:error, term()}

Zoom an image

Arguments

  • input - Input image
  • xfac - Horizontal zoom factor
  • yfac - Vertical zoom factor

zoom!(input, xfac, yfac)

Zoom an image

Arguments

  • input - Input image
  • xfac - Horizontal zoom factor
  • yfac - Vertical zoom factor