BitmapScalingMode Enumeration Home
This page is specific to:.NET Framework Version:3.03.54.0
.NET Framework Class Library
BitmapScalingMode Enumeration

Updated: July 2008

Specifies which algorithm is used to scale bitmap images.

Namespace:  System.Windows.Media
Assembly:  PresentationCore (in PresentationCore.dll)
Syntax

'Usage

Dim instance As BitmapScalingMode

'Declaration

Public Enumeration BitmapScalingMode
<object property="enumerationMemberName" .../>
Members

Member nameDescription
UnspecifiedUse the default bitmap scaling mode, which is Fant.
LowQualityUse bilinear bitmap scaling, which is faster than HighQuality mode, but produces lower quality output. The LowQuality mode is the same as the Linear mode.
HighQualityUse 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.
LinearUse linear bitmap scaling, which is faster than HighQuality mode, but produces lower quality output.
FantUse very high quality Fant bitmap scaling, which is slower than all other bitmap scaling modes, but produces higher quality output.
NearestNeighborUse 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.
Remarks

When animating the scale of any bitmap, the default high-quality image re-sampling 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 BitmapScalingMode property of the RenderOptions object to LowQuality you can create a smoother animation when scaling a bitmap.

Examples

The following example shows how to set the BitmapScalingMode for an image object.

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


Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information

.NET Framework

Supported in: 3.5, 3.0
See Also

Reference

Change History

Date

History

Reason

July 2008

Added entries for new Fant, Linear, and NearestNeighbor enumerations.

SP1 feature change.

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View