Image.Options.Rotate (image v0.70.0)

Copy Markdown View Source

Options and option validation for Image.rotate/3.

Summary

Types

The interpolators that may be selected with the :interpolate option (descriptions from vips -l interpolate)

The options applicable to rotating an image.

Types

interpolate()

@type interpolate() :: :nearest | :bilinear | :bicubic | :lbb | :nohalo | :vsqbs

The interpolators that may be selected with the :interpolate option (descriptions from vips -l interpolate):

  • :nearest - nearest-neighbour interpolation
  • :bilinear (default) - bilinear interpolation
  • :bicubic - bicubic interpolation (Catmull-Rom)
  • :lbb - reduced halo bicubic
  • :nohalo - edge sharpening resampler with halo reduction
  • :vsqbs - B-Splines with antialiasing smoothing

rotation_options()

@type rotation_options() :: [
  idy: number(),
  idx: number(),
  ody: number(),
  odx: number(),
  interpolate: interpolate(),
  background: Image.Pixel.t() | :average
]

The options applicable to rotating an image.

Functions

validate_options(image, options)

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

Validate the options for Image.rotate/3.

The image is required to resolve the :background option into a pixel matching the image's bands and color space.

See Image.Options.Rotate.rotation_options/0.