Enum gdk_pixbuf::InterpType [−][src]
#[non_exhaustive] pub enum InterpType { Nearest, Tiles, Bilinear, Hyper, // some variants omitted }
Expand description
This enumeration describes the different interpolation modes that
can be used with the scaling functions. Nearest
is
the fastest scaling method, but has horrible quality when
scaling down. Bilinear
is the best choice if you
aren’t sure what to choose, it has a good speed/quality balance.
Note: Cubic filtering is missing from the list; hyperbolic interpolation is just as fast and results in higher quality.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Nearest neighbor sampling; this is the fastest and lowest quality mode. Quality is normally unacceptable when scaling down, but may be OK when scaling up.
This is an accurate simulation of the PostScript image operator without any interpolation enabled. Each pixel is rendered as a tiny parallelogram of solid color, the edges of which are implemented with antialiasing. It resembles nearest neighbor for enlargement, and bilinear for reduction.
Best quality/speed balance; use this mode by default. Bilinear interpolation. For enlargement, it is equivalent to point-sampling the ideal bilinear-interpolated image. For reduction, it is equivalent to laying down small tiles and integrating over the coverage area.
This is the slowest and highest quality
reconstruction function. It is derived from the hyperbolic filters in
Wolberg’s “Digital Image Warping”, and is formally defined as the
hyperbolic-filter sampling the ideal hyperbolic-filter interpolated
image (the filter is designed to be idempotent for 1:1 pixel mapping).
Deprecated: this interpolation filter is deprecated, as in reality
it has a lower quality than the Bilinear
filter
(Since: 2.38)
Trait Implementations
type Checker = GenericValueTypeChecker<Self>
type Checker = GenericValueTypeChecker<Self>
Value type checker.
Get the contained value from a Value
. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Returns the type identifier of Self
.
Auto Trait Implementations
impl RefUnwindSafe for InterpType
impl Send for InterpType
impl Sync for InterpType
impl Unpin for InterpType
impl UnwindSafe for InterpType
Blanket Implementations
Mutably borrows from an owned value. Read more
Returns a SendValue
clone of self
.