java-gnome version 4.0.19

org.gnome.gdk
Class InterpType

Object
  extended by org.freedesktop.bindings.Constant
      extended by org.gnome.gdk.InterpType

public final class InterpType
extends org.freedesktop.bindings.Constant

Interpolation algorithms available in GDK. These are used to control the choice of algorithm that will be applied when scaling an image with Pixbuf's scale() method. In general use it is recommended that you use the BILINEAR algorithm.

The details of the implementations of the interpolation techniques made available here are obviously highly technical, and so are adapted directly from the gdk-pixbuf library's documentation.

Since:
4.0.10
Author:
Andrew Cowie

Field Summary
static InterpType BILINEAR
          Use the bilinear interpolation method.
static InterpType HYPER
          A hyperbolic filtering algorithm.
static InterpType NEAREST
          Interpolate by "nearest neighbour" sampling.
static InterpType TILES
          Each pixel is rendered as a tiny parallelogram of solid color, the edges of which are implemented with antialiasing.
 
Method Summary
 
Methods inherited from class org.freedesktop.bindings.Constant
toString
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BILINEAR

public static final InterpType BILINEAR
Use the bilinear interpolation method. When scaling up, this choice is equivalent to point-sampling the ideal bilinear-interpolated image. For scaling down, it is equivalent to laying down small tiles and integrating over the coverage area. This is considered the best choice in normal situations, providing a decent balance between speed and quality.


HYPER

public static final InterpType HYPER
A hyperbolic filtering algorithm. This is a refinement of Wolberg's digital image warping. This method is the slowest of the available choices, but generally gives the highest quality results.

The filter is idempotent for 1:1 pixel mapping.

According to the GDK documentation, this algorithm is formally defined as the "hyperbolic-filter sampling the ideal hyperbolic-filter interpolated image". Good thing they let us know that.


NEAREST

public static final InterpType NEAREST
Interpolate by "nearest neighbour" sampling. This is a fast algorithm which, unfortunately, results in really ugly images when scaling down.


TILES

public static final InterpType TILES
Each pixel is rendered as a tiny parallelogram of solid color, the edges of which are implemented with antialiasing. The result is similar to NEAREST if scaling up, and to BILINEAR if scaling down.

This is supposedly an accurate simulation of the PostScript's image operator (without any interpolation enabled).



java-gnome