Options shared by transformations implemented with Vix.Vips.Operation.mapim/3.
Summary
Types
A background fill option for a mapim-based transformation.
Interpolation and background options for transformations that expose canvas.
How the interpolator synthesizes the one-pixel fringe just beyond the content edge when resampling boundary pixels.
An interpolation-boundary option for a mapim-based transformation.
The interpolators that may be selected with the :interpolate
option (descriptions from vips -l interpolate)
An interpolation option for a mapim-based transformation.
Interpolation options for transformations with fixed boundary handling.
Interpolation, background and boundary options for a mapim-based transformation.
Functions
Validates the allowed options for a mapim-based transformation.
Types
@type background_option() :: {:background, Image.BackgroundColor.spec() | nil}
A background fill option for a mapim-based transformation.
@type background_options() :: [interpolate_option() | background_option()]
Interpolation and background options for transformations that expose canvas.
@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 extend_option() :: {:extend_mode, extend_mode()}
An interpolation-boundary option for a mapim-based transformation.
@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- bilinear interpolation:bicubic- bicubic interpolation (Catmull-Rom):lbb- reduced halo bicubic:nohalo- edge sharpening resampler with halo reduction:vsqbs- B-Splines with antialiasing smoothing
:bilinear is the default except for Image.distort/4, which
retains its existing :bicubic default.
@type interpolate_option() :: {:interpolate, interpolate()}
An interpolation option for a mapim-based transformation.
@type interpolate_options() :: [interpolate_option()]
Interpolation options for transformations with fixed boundary handling.
@type t() :: [interpolate_option() | background_option() | extend_option()]
Interpolation, background and boundary options for a mapim-based transformation.
Functions
@spec validate_options(Vix.Vips.Image.t(), Keyword.t(), [option_name()]) :: {:ok, Keyword.t()} | {:error, Image.error()}
Validates the allowed options for a mapim-based transformation.
All mapim options are allowed by default.