BitmapScalingMode Enum
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies which algorithm is used to scale bitmap images.
public enum class BitmapScalingMode
public enum BitmapScalingMode
type BitmapScalingMode =
Public Enum BitmapScalingMode
- Inheritance
Name | Value | Description |
---|---|---|
Unspecified | 0 | Use the default bitmap scaling mode, which is Linear. |
Linear | 1 | Use linear bitmap scaling, which is faster than HighQuality mode, but produces lower quality output. |
LowQuality | 1 | Use bilinear bitmap scaling, which is faster than HighQuality mode, but produces lower quality output. The LowQuality mode is the same as the Linear mode. |
Fant | 2 | Use very high quality Fant bitmap scaling, which is slower than all other bitmap scaling modes, but produces higher quality output. |
HighQuality | 2 | Use high quality bitmap scaling, which is slower than LowQuality mode, but produces higher quality output. The HighQuality mode is the same as the Fant mode. |
NearestNeighbor | 3 | 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. |
The 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)
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. By setting the RenderOptions.BitmapScalingMode property to LowQuality
, you can create a smoother animation when scaling a bitmap.
제품 | 버전 |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
.NET 피드백
.NET은(는) 오픈 소스 프로젝트입니다. 다음 링크를 선택하여 피드백을 제공해 주세요.