Package: gdk-pixbuf

GEnum gdk-interp-type

Details

This enumeration describes the different interpolation modes that can be used with the scaling functions. The :nearest mode is the fastest scaling method, but has horrible quality when scaling down. The :bilinear mode is the best choice if you are not 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.
(define-g-enum "GdkInterpType" gdk-interp-type
  (:export t
   :type-initializer "gdk_interp_type_get_type")
  (:nearest 0)
  (:tiles 0)
  (:bilinear 0)
  (:hyper 0))  
:nearest
Nearest neighbor sampling: This is the fastest and lowest quality mode. Quality is normally unacceptable when scaling down, but may be fine when scaling up.
:tiles
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.
:bilinear
Bilinear interpolation: Best quality/speed balance. Use this mode by default. 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.
:hyper
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 since 2.38, as in reality it has a lower quality than the :bilinear filter.
 

See also

2021-12-12