InterpolationMode enum
Interpolation algorithm used for image resizing.
Values
- nearest → const InterpolationMode
-
Nearest-neighbor interpolation (fastest, lowest quality).
- bilinear → const InterpolationMode
-
Bilinear interpolation (balanced speed and quality).
- bicubic → const InterpolationMode
-
Bicubic interpolation (slowest, highest quality).
- area → const InterpolationMode
-
Area interpolation (best for downsampling, anti-aliasing).
Computes output by averaging source pixels within each output pixel's area. Avoids aliasing artifacts during downsampling. Equivalent to
F.interpolate(mode='area')in PyTorch. - lanczos → const InterpolationMode
-
Lanczos interpolation (high quality, uses Lanczos3 kernel).
Uses sinc-based kernel with a=3, sampling 6x6 source pixels. Best for high-quality upscaling and downscaling. Equivalent to
InterpolationMode.LANCZOSin torchvision.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
InterpolationMode> - A constant List of the values in this enum, in order of their declaration.