BitmapScalingMode Enum

Definition

指定使用哪種演算法來縮放點陣圖影像。Specifies which algorithm is used to scale bitmap images.

public enum class BitmapScalingMode
public enum BitmapScalingMode
type BitmapScalingMode = 
Public Enum BitmapScalingMode
Inheritance
BitmapScalingMode

Fields

Fant 2

您可以使用非常高品質的 Fant 點陣圖縮放,其執行速度比所有其他點陣圖縮放模式慢,但產生的輸出品質較高。Use very high quality Fant bitmap scaling, which is slower than all other bitmap scaling modes, but produces higher quality output.

HighQuality 2

您可以使用高品質點陣圖縮放,其執行速度比 LowQuality 模式慢,但產生的輸出品質較高。Use high quality bitmap scaling, which is slower than LowQuality mode, but produces higher quality output. HighQuality 模式和 Fant 模式相同。The HighQuality mode is the same as the Fant mode.

Linear 1

您可以使用線性點陣圖縮放,其執行速度比 HighQuality 模式快,但產生的輸出品質較低。Use linear bitmap scaling, which is faster than HighQuality mode, but produces lower quality output.

LowQuality 1

您可以使用雙線性點陣圖縮放,其執行速度比 HighQuality 模式快,但產生的輸出品質較低。Use bilinear bitmap scaling, which is faster than HighQuality mode, but produces lower quality output. LowQuality 模式和 Linear 模式相同。The LowQuality mode is the same as the Linear mode.

NearestNeighbor 3

您可以在使用軟體光柵處理器時使用最相鄰的點陣圖縮放,它提供的效能優於 LowQuality 模式。Use nearest-neighbor bitmap scaling, which provides performance benefits over LowQuality mode when the software rasterizer is used. 這個模式通常是用來放大點陣圖。This mode is often used to magnify a bitmap.

Unspecified 0

您可以使用預設的點陣圖縮放模式,也就是 LinearUse the default bitmap scaling mode, which is Linear.

Examples

下列範例示範如何使用 RenderOptions.SetBitmapScalingMode 方法,將點陣圖縮放模式設定為影像物件的 LowQualityThe following example shows how to use the RenderOptions.SetBitmapScalingMode method to set the bitmap scale mode to LowQuality for an image object:

// Set the bitmap scaling mode for the image to render faster.
RenderOptions.SetBitmapScalingMode(MyImage, BitmapScalingMode.LowQuality);
' Set the bitmap scaling mode for the image to render faster.
RenderOptions.SetBitmapScalingMode(MyImage, BitmapScalingMode.LowQuality)

Remarks

為任何點陣圖的尺規製作動畫時,預設的高品質影像重新取樣演算法有時可能會耗用足夠的系統資源,以導致畫面播放速率降低。When animating the scale of any bitmap, the default high-quality image resampling algorithm can sometimes consume sufficient system resources to cause frame rate degradation. 此畫面播放速率降低會導致動畫略過框架或斷斷續續。This frame rate degradation can cause animations to skip frames or stutter. 藉由將 [RenderOptions.BitmapScalingMode] 屬性設定為 [LowQuality],您可以在縮放點陣圖時建立更平滑的動畫。By setting the RenderOptions.BitmapScalingMode property to LowQuality, you can create a smoother animation when scaling a bitmap.

Applies to

See also