PeachDrawing.Core
PeachDrawing.Core
ImageSampling Enum
How the pixels of an image are read when it is drawn at a size other than its own.
public enum ImageSampling
Fields
Automatic 0
Whatever the image itself asks for (Interpolate): smooth, or crisp when enlarged.
Nearest 1
Each output pixel takes the colour of the one source pixel it falls in. Enlarging gives hard-edged blocks (pixel art stays crisp); shrinking skips pixels and can look jagged.
Bilinear 2
Neighbouring source pixels are blended by distance; shrinking averages the pixels it covers.
Bicubic 3
A sharper blend over the sixteen nearest source pixels (a Catmull-Rom curve). Enlarging keeps edges cleaner than Bilinear. A canvas without a bicubic filter of its own treats this as Bilinear.
Pixelated 4
Crisp when enlarging, like Nearest (pixel art stays as hard-edged blocks), but smooth when shrinking, where skipping pixels would only look jagged.