ImageScalingMode Enum
Definition
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.
The scaling mode to use for WinForms/Win32 images
public enum class ImageScalingMode
public enum class ImageScalingMode
enum ImageScalingMode
public enum ImageScalingMode
type ImageScalingMode =
Public Enum ImageScalingMode
- Inheritance
-
ImageScalingMode
Fields
Name | Value | Description |
---|---|---|
Default | 0 | Let the shell pick what looks best depending on the current DPI zoom factor |
BorderOnly | 1 | Keep the actual image unscaled, add a border around the image |
NearestNeighbor | 2 | Sharp results, but pixelated, and possibly distorted unless multiple of 100% scaling |
Bilinear | 3 | Smooth results, without distorsions, but fuzzy (uses GDI+ InterpolationMode.Bilinear) |
Bicubic | 4 | Smooth results, without distorsions, but fuzzy (uses GDI+ InterpolationMode.Bicubic) |
HighQualityBilinear | 5 | Smooth results, without distorsions, but fuzzy (uses GDI+ InterpolationMode.HighQualityBilinear) |
HighQualityBicubic | 6 | Smooth results, without distorsions, but fuzzy (uses GDI+ InterpolationMode.HighQualityBicubic) |
MixedNearestNeighborHighQualityBicubic | 7 | Sharper results than Bicubic for large zoom levels, without distorsions, but fuzzy (2 steps-scaling, uses NearestNeighbor up to the closest multiple of 100%, then GDI+ InterpolationMode.HighQualityBicubic from there) |
Remarks
DEV NOTE: The image scaling modes available here for WinForms and WPF match the similar scaling modes for Win32 from vscommon\vsuilib\VsUIDpiHelper.h If changes are made to algorithms in this managed DpiHelper class, matching changes will have to be made to the native class, too.