Options and option validation for Image.affine/3.
These options are shared by the affine family of
transformations: Image.affine/3, Image.translate/4
and Image.shear/4.
Summary
Types
The options applicable to an affine transformation.
How the interpolator synthesizes the one-pixel fringe just beyond the content edge when resampling boundary pixels.
The interpolators that may be selected with the :interpolate
option (descriptions from vips -l interpolate)
Functions
Validate the options for Image.affine/3.
Types
@type affine_options() :: [ idx: number(), idy: number(), odx: number(), ody: number(), interpolate: interpolate(), background: Image.BackgroundColor.spec() | nil, extend_mode: extend_mode(), output_area: [integer()] ]
The options applicable to an affine transformation.
@type extend_mode() :: :background | :copy
How the interpolator synthesizes the one-pixel fringe just beyond the content edge when resampling boundary pixels.
:background(the default) blends the fringe toward the:backgroundcolor. This is correct whenever the transform exposes canvas.:copyclamps to the nearest content pixel. Use it when the content fills the whole canvas, where the default would leave a faint border along the outermost row and column.
@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
Functions
@spec validate_options(Vix.Vips.Image.t(), Keyword.t()) :: {:ok, Keyword.t()} | {:error, Image.error()}
Validate the options for Image.affine/3.
The image is required to resolve the :background option
into a pixel matching the image's bands and color space.