DpiHelper.CreateDeviceFromLogicalImage Method (Bitmap, Size, Color, ImageScalingMode)
Visual Studio 2015
Creates and returns a new bitmap or metafile scaled for the device units. When displayed on the device, the scaled image will have same size as the original image would have when displayed at 96dpi.
Assembly: Microsoft.VisualStudio.Shell.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)
public static Bitmap CreateDeviceFromLogicalImage( this Bitmap logicalBitmapStrip, Size logicalImageSize, Color backgroundColor, ImageScalingMode scalingMode = ImageScalingMode.Default )
Parameters
- logicalBitmapStrip
-
Type:
System.Drawing.Bitmap
The logical bitmap strip.
- logicalImageSize
-
Type:
System.Drawing.Size
The size of the logical image.
- backgroundColor
-
Type:
System.Drawing.Color
A color value to be used for the image background. When the interpolation mode is Bilinear or Bicubic, the image's margins are interpolated with the background.
- scalingMode
-
Type:
Microsoft.VisualStudio.PlatformUI.ImageScalingMode
The scaling mode to use when scaling the image.
Show: