View Source Image.Options.WarpPerspective (image v0.54.4)

Options and option validation for Image.warp_perspective/4.

Summary

Types

When extending the canvas the generated pixels are determined by this option.

t()

Options for Image.warp_perspective/4.

Options applicable to Image.embed/4.

Types

@type extend_mode() :: [:black | :white | :copy | :repeat | :mirror | :background]

When extending the canvas the generated pixels are determined by this option.

@type t() :: [warp_perspective_option()]

Options for Image.warp_perspective/4.

Link to this type

warp_perspective_option()

View Source
@type warp_perspective_option() :: [
  background: Image.Color.t() | :average,
  extend_mode: extend_mode()
]

Options applicable to Image.embed/4.

Functions

Link to this function

validate_options(image, options)

View Source
@spec validate_options(Vix.Vips.Image.t(), Keyword.t()) ::
  {:ok, Keyword.t()} | {:error, Image.error_message()}

Validate the options for Image.warp_perspective/4.