Click or drag to resize

ImageInterpolation Enumeration

[Missing <summary> documentation for "T:Godot.Image.Interpolation"]

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public enum Interpolation
Members
  Member nameValueDescription
Nearest0

Performs nearest-neighbor interpolation. If the image is resized, it will be pixelated.

Bilinear1

Performs bilinear interpolation. If the image is resized, it will be blurry. This mode is faster than , but it results in lower quality.

Cubic2

Performs cubic interpolation. If the image is resized, it will be blurry. This mode often gives better results compared to , at the cost of being slower.

Trilinear3

Performs bilinear separately on the two most-suited mipmap levels, then linearly interpolates between them.

It's slower than , but produces higher-quality results with much less aliasing artifacts.

If the image does not have mipmaps, they will be generated and used internally, but no mipmaps will be generated on the resulting image.

Note: If you intend to scale multiple copies of the original image, it's better to call GenerateMipmaps(Boolean)] on it in advance, to avoid wasting processing power in generating them again and again.

On the other hand, if the image already has mipmaps, they will be used, and a new set will be generated for the resulting image.

Lanczos4

Performs Lanczos interpolation. This is the slowest image resizing mode, but it typically gives the best results, especially when downscalng images.

See Also