Enum SamplingModeType

Definition

Namespace:
Tizen.NUI
Assembly:
Tizen.NUI.dll
API Level:
3

This specifies sampling mode types. Filtering options are used when resizing images to sample original pixels.
A SamplingMode controls how pixels in an input image are sampled and combined to generate each pixel of a destination image during scaling.
NoFilter and Box modes do not guarantee that the output pixel array exactly matches the rectangle specified by the desired dimensions and the FittingMode,
but all other filter modes do if the desired dimensions are not more than the raw dimensions of the input image file.

C#
Copy
public enum SamplingModeType : int
Name Description
Box

Iteratively box filter to generate an image of 1/2, 1/4, 1/8, etc. width and height and approximately the desired size.
This is the default.

BoxThenLinear

Iteratively box filter to almost the right size, then for each output pixel, read four pixels from the last level of box filtering and write their weighted average.

BoxThenNearest

Iteratively box filter to generate an image of 1/2, 1/4, 1/8, etc. width and height and approximately the desired size,
then for each output pixel, read one pixel from the last level of box filtering.

DontCare

For caching algorithms where a client strongly prefers a cache-hit to reuse a cached image.

Linear

For each output pixel, read a quad of four input pixels and write a weighted average of them.

Nearest

For each output pixel, read one input pixel.

NoFilter

No filtering is performed. If the SCALE_TO_FILL scaling mode is enabled, the borders of the image may be trimmed to match the aspect ratio of the desired dimensions.

Extension Methods