View Source Vix.Vips.MutableOperation (vix v0.31.1)

Module for Vix.Vips.MutableOperation.

Summary

Types

@type vips_access() ::
  :VIPS_ACCESS_RANDOM
  | :VIPS_ACCESS_SEQUENTIAL
  | :VIPS_ACCESS_SEQUENTIAL_UNBUFFERED
@type vips_align() :: :VIPS_ALIGN_LOW | :VIPS_ALIGN_CENTRE | :VIPS_ALIGN_HIGH
@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
@type vips_angle() ::
  :VIPS_ANGLE_D0 | :VIPS_ANGLE_D90 | :VIPS_ANGLE_D180 | :VIPS_ANGLE_D270
@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
@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
@type vips_coding() ::
  :VIPS_CODING_ERROR | :VIPS_CODING_NONE | :VIPS_CODING_LABQ | :VIPS_CODING_RAD
@type vips_combine() :: :VIPS_COMBINE_MAX | :VIPS_COMBINE_SUM | :VIPS_COMBINE_MIN
@type vips_combine_mode() :: :VIPS_COMBINE_MODE_SET | :VIPS_COMBINE_MODE_ADD
Link to this type

vips_compass_direction()

View Source
@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
@type vips_demand_style() ::
  :VIPS_DEMAND_STYLE_ERROR
  | :VIPS_DEMAND_STYLE_SMALLTILE
  | :VIPS_DEMAND_STYLE_FATSTRIP
  | :VIPS_DEMAND_STYLE_THINSTRIP
@type vips_direction() :: :VIPS_DIRECTION_HORIZONTAL | :VIPS_DIRECTION_VERTICAL
@type vips_extend() ::
  :VIPS_EXTEND_BLACK
  | :VIPS_EXTEND_COPY
  | :VIPS_EXTEND_REPEAT
  | :VIPS_EXTEND_MIRROR
  | :VIPS_EXTEND_WHITE
  | :VIPS_EXTEND_BACKGROUND
@type vips_fail_on() ::
  :VIPS_FAIL_ON_NONE
  | :VIPS_FAIL_ON_TRUNCATED
  | :VIPS_FAIL_ON_ERROR
  | :VIPS_FAIL_ON_WARNING
Link to this type

vips_foreign_dz_container()

View Source
@type vips_foreign_dz_container() ::
  :VIPS_FOREIGN_DZ_CONTAINER_FS
  | :VIPS_FOREIGN_DZ_CONTAINER_ZIP
  | :VIPS_FOREIGN_DZ_CONTAINER_SZI
Link to this type

vips_foreign_dz_depth()

View Source
@type vips_foreign_dz_depth() ::
  :VIPS_FOREIGN_DZ_DEPTH_ONEPIXEL
  | :VIPS_FOREIGN_DZ_DEPTH_ONETILE
  | :VIPS_FOREIGN_DZ_DEPTH_ONE
Link to this type

vips_foreign_dz_layout()

View Source
@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
@type vips_foreign_flags() :: [
  :VIPS_FOREIGN_NONE
  | :VIPS_FOREIGN_PARTIAL
  | :VIPS_FOREIGN_BIGENDIAN
  | :VIPS_FOREIGN_SEQUENTIAL
]
Link to this type

vips_foreign_heif_compression()

View Source
@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
Link to this type

vips_foreign_heif_encoder()

View Source
@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
@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
]
Link to this type

vips_foreign_png_filter()

View Source
@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
]
Link to this type

vips_foreign_subsample()

View Source
@type vips_foreign_subsample() ::
  :VIPS_FOREIGN_SUBSAMPLE_AUTO
  | :VIPS_FOREIGN_SUBSAMPLE_ON
  | :VIPS_FOREIGN_SUBSAMPLE_OFF
Link to this type

vips_foreign_tiff_compression()

View Source
@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
Link to this type

vips_foreign_tiff_predictor()

View Source
@type vips_foreign_tiff_predictor() ::
  :VIPS_FOREIGN_TIFF_PREDICTOR_NONE
  | :VIPS_FOREIGN_TIFF_PREDICTOR_HORIZONTAL
  | :VIPS_FOREIGN_TIFF_PREDICTOR_FLOAT
Link to this type

vips_foreign_tiff_resunit()

View Source
@type vips_foreign_tiff_resunit() ::
  :VIPS_FOREIGN_TIFF_RESUNIT_CM | :VIPS_FOREIGN_TIFF_RESUNIT_INCH
Link to this type

vips_foreign_webp_preset()

View Source
@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
@type vips_intent() ::
  :VIPS_INTENT_PERCEPTUAL
  | :VIPS_INTENT_RELATIVE
  | :VIPS_INTENT_SATURATION
  | :VIPS_INTENT_ABSOLUTE
@type vips_interesting() ::
  :VIPS_INTERESTING_NONE
  | :VIPS_INTERESTING_CENTRE
  | :VIPS_INTERESTING_ENTROPY
  | :VIPS_INTERESTING_ATTENTION
  | :VIPS_INTERESTING_LOW
  | :VIPS_INTERESTING_HIGH
  | :VIPS_INTERESTING_ALL
@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
@type vips_kernel() ::
  :VIPS_KERNEL_NEAREST
  | :VIPS_KERNEL_LINEAR
  | :VIPS_KERNEL_CUBIC
  | :VIPS_KERNEL_MITCHELL
  | :VIPS_KERNEL_LANCZOS2
  | :VIPS_KERNEL_LANCZOS3
Link to this type

vips_operation_boolean()

View Source
@type vips_operation_boolean() ::
  :VIPS_OPERATION_BOOLEAN_AND
  | :VIPS_OPERATION_BOOLEAN_OR
  | :VIPS_OPERATION_BOOLEAN_EOR
  | :VIPS_OPERATION_BOOLEAN_LSHIFT
  | :VIPS_OPERATION_BOOLEAN_RSHIFT
Link to this type

vips_operation_complex2()

View Source
@type vips_operation_complex2() :: :VIPS_OPERATION_COMPLEX2_CROSS_PHASE
Link to this type

vips_operation_complex()

View Source
@type vips_operation_complex() ::
  :VIPS_OPERATION_COMPLEX_POLAR
  | :VIPS_OPERATION_COMPLEX_RECT
  | :VIPS_OPERATION_COMPLEX_CONJ
Link to this type

vips_operation_complexget()

View Source
@type vips_operation_complexget() ::
  :VIPS_OPERATION_COMPLEXGET_REAL | :VIPS_OPERATION_COMPLEXGET_IMAG
Link to this type

vips_operation_math2()

View Source
@type vips_operation_math2() ::
  :VIPS_OPERATION_MATH2_POW
  | :VIPS_OPERATION_MATH2_WOP
  | :VIPS_OPERATION_MATH2_ATAN2
@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
Link to this type

vips_operation_morphology()

View Source
@type vips_operation_morphology() ::
  :VIPS_OPERATION_MORPHOLOGY_ERODE | :VIPS_OPERATION_MORPHOLOGY_DILATE
Link to this type

vips_operation_relational()

View Source
@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
Link to this type

vips_operation_round()

View Source
@type vips_operation_round() ::
  :VIPS_OPERATION_ROUND_RINT
  | :VIPS_OPERATION_ROUND_CEIL
  | :VIPS_OPERATION_ROUND_FLOOR
@type vips_pcs() :: :VIPS_PCS_LAB | :VIPS_PCS_XYZ
@type vips_precision() ::
  :VIPS_PRECISION_INTEGER | :VIPS_PRECISION_FLOAT | :VIPS_PRECISION_APPROXIMATE
@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
@type vips_size() ::
  :VIPS_SIZE_BOTH | :VIPS_SIZE_UP | :VIPS_SIZE_DOWN | :VIPS_SIZE_FORCE
@type vips_text_wrap() ::
  :VIPS_TEXT_WRAP_WORD
  | :VIPS_TEXT_WRAP_CHAR
  | :VIPS_TEXT_WRAP_WORD_CHAR
  | :VIPS_TEXT_WRAP_NONE

Functions

Link to this function

draw_circle(image, ink, cx, cy, radius, optional \\ [])

View Source
@spec draw_circle(
  Vix.Vips.MutableImage.t(),
  [float()],
  integer(),
  integer(),
  integer(),
  [
    {:fill, boolean()}
  ]
) :: :ok | {:error, term()}

Draw a circle on an image

Arguments

  • image - Image to draw on
  • ink - Color for pixels
  • cx - Centre of draw_circle
  • cy - Centre of draw_circle
  • radius - Radius in pixels

Optional

  • fill - Draw a solid object. Default: false
Link to this function

draw_circle!(image, ink, cx, cy, radius, optional \\ [])

View Source
@spec draw_circle!(
  Vix.Vips.MutableImage.t(),
  [float()],
  integer(),
  integer(),
  integer(),
  [
    {:fill, boolean()}
  ]
) :: :ok | no_return()

Draw a circle on an image

Arguments

  • image - Image to draw on
  • ink - Color for pixels
  • cx - Centre of draw_circle
  • cy - Centre of draw_circle
  • radius - Radius in pixels

Optional

  • fill - Draw a solid object. Default: false
Link to this function

draw_flood(image, ink, x, y, optional \\ [])

View Source
@spec draw_flood(Vix.Vips.MutableImage.t(), [float()], integer(), integer(),
  equal: boolean(),
  test: Vix.Vips.Image.t()
) ::
  {:ok,
   {%{height: integer(), width: integer(), top: integer(), left: integer()}}}
  | {:error, term()}

Flood-fill an area

Arguments

  • image - Image to draw on
  • ink - Color for pixels
  • x - DrawFlood start point
  • y - DrawFlood start point

Optional

  • equal - DrawFlood while equal to edge. Default: false
  • test - Test pixels in this image.

Returns

Operation returns a tuple

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

  • height - Height of modified area. (integer())
  • width - Width of modified area. (integer())
  • top - Top edge of modified area. (integer())
  • left - Left edge of modified area. (integer())
Link to this function

draw_flood!(image, ink, x, y, optional \\ [])

View Source
@spec draw_flood!(Vix.Vips.MutableImage.t(), [float()], integer(), integer(),
  equal: boolean(),
  test: Vix.Vips.Image.t()
) ::
  {%{height: integer(), width: integer(), top: integer(), left: integer()}}
  | no_return()

Flood-fill an area

Arguments

  • image - Image to draw on
  • ink - Color for pixels
  • x - DrawFlood start point
  • y - DrawFlood start point

Optional

  • equal - DrawFlood while equal to edge. Default: false
  • test - Test pixels in this image.

Returns

Operation returns a tuple

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

  • height - Height of modified area. (integer())
  • width - Width of modified area. (integer())
  • top - Top edge of modified area. (integer())
  • left - Left edge of modified area. (integer())
Link to this function

draw_image(image, sub, x, y, optional \\ [])

View Source
@spec draw_image(
  Vix.Vips.MutableImage.t(),
  Vix.Vips.Image.t(),
  integer(),
  integer(),
  [
    {:mode, vips_combine_mode()}
  ]
) :: :ok | {:error, term()}

Paint an image into another image

Arguments

  • image - Image to draw on
  • sub - Sub-image to insert into main image
  • x - Draw image here
  • y - Draw image here

Optional

  • mode - Combining mode. Default: :VIPS_COMBINE_MODE_SET
Link to this function

draw_image!(image, sub, x, y, optional \\ [])

View Source
@spec draw_image!(
  Vix.Vips.MutableImage.t(),
  Vix.Vips.Image.t(),
  integer(),
  integer(),
  [
    {:mode, vips_combine_mode()}
  ]
) :: :ok | no_return()

Paint an image into another image

Arguments

  • image - Image to draw on
  • sub - Sub-image to insert into main image
  • x - Draw image here
  • y - Draw image here

Optional

  • mode - Combining mode. Default: :VIPS_COMBINE_MODE_SET
Link to this function

draw_line(image, ink, x1, y1, x2, y2)

View Source
@spec draw_line(
  Vix.Vips.MutableImage.t(),
  [float()],
  integer(),
  integer(),
  integer(),
  integer()
) ::
  :ok | {:error, term()}

Draw a line on an image

Arguments

  • image - Image to draw on
  • ink - Color for pixels
  • x1 - Start of draw_line
  • y1 - Start of draw_line
  • x2 - End of draw_line
  • y2 - End of draw_line
Link to this function

draw_line!(image, ink, x1, y1, x2, y2)

View Source
@spec draw_line!(
  Vix.Vips.MutableImage.t(),
  [float()],
  integer(),
  integer(),
  integer(),
  integer()
) ::
  :ok | no_return()

Draw a line on an image

Arguments

  • image - Image to draw on
  • ink - Color for pixels
  • x1 - Start of draw_line
  • y1 - Start of draw_line
  • x2 - End of draw_line
  • y2 - End of draw_line
Link to this function

draw_mask(image, ink, mask, x, y)

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

Draw a mask on an image

Arguments

  • image - Image to draw on
  • ink - Color for pixels
  • mask - Mask of pixels to draw
  • x - Draw mask here
  • y - Draw mask here
Link to this function

draw_mask!(image, ink, mask, x, y)

View Source
@spec draw_mask!(
  Vix.Vips.MutableImage.t(),
  [float()],
  Vix.Vips.Image.t(),
  integer(),
  integer()
) ::
  :ok | no_return()

Draw a mask on an image

Arguments

  • image - Image to draw on
  • ink - Color for pixels
  • mask - Mask of pixels to draw
  • x - Draw mask here
  • y - Draw mask here
Link to this function

draw_rect(image, ink, left, top, width, height, optional \\ [])

View Source
@spec draw_rect(
  Vix.Vips.MutableImage.t(),
  [float()],
  integer(),
  integer(),
  integer(),
  integer(),
  [
    {:fill, boolean()}
  ]
) :: :ok | {:error, term()}

Paint a rectangle on an image

Arguments

  • image - Image to draw on
  • ink - Color for pixels
  • left - Rect to fill
  • top - Rect to fill
  • width - Rect to fill
  • height - Rect to fill

Optional

  • fill - Draw a solid object. Default: false
Link to this function

draw_rect!(image, ink, left, top, width, height, optional \\ [])

View Source
@spec draw_rect!(
  Vix.Vips.MutableImage.t(),
  [float()],
  integer(),
  integer(),
  integer(),
  integer(),
  [
    {:fill, boolean()}
  ]
) :: :ok | no_return()

Paint a rectangle on an image

Arguments

  • image - Image to draw on
  • ink - Color for pixels
  • left - Rect to fill
  • top - Rect to fill
  • width - Rect to fill
  • height - Rect to fill

Optional

  • fill - Draw a solid object. Default: false
Link to this function

draw_smudge(image, left, top, width, height)

View Source
@spec draw_smudge(
  Vix.Vips.MutableImage.t(),
  integer(),
  integer(),
  integer(),
  integer()
) ::
  :ok | {:error, term()}

Blur a rectangle on an image

Arguments

  • image - Image to draw on
  • left - Rect to fill
  • top - Rect to fill
  • width - Rect to fill
  • height - Rect to fill
Link to this function

draw_smudge!(image, left, top, width, height)

View Source
@spec draw_smudge!(
  Vix.Vips.MutableImage.t(),
  integer(),
  integer(),
  integer(),
  integer()
) ::
  :ok | no_return()

Blur a rectangle on an image

Arguments

  • image - Image to draw on
  • left - Rect to fill
  • top - Rect to fill
  • width - Rect to fill
  • height - Rect to fill