DpiHelper.CreateDeviceFromLogicalImage Method (Image, ImageScalingMode)

 

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.

Namespace:   Microsoft.VisualStudio.PlatformUI
Assembly:  Microsoft.VisualStudio.Shell.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)

public static Image CreateDeviceFromLogicalImage(
	this Image logicalImage,
	ImageScalingMode scalingMode = ImageScalingMode.Default
)

Parameters

logicalImage
Type: System.Drawing.Image

The image to scale from logical units to device units.

scalingMode
Type: Microsoft.VisualStudio.PlatformUI.ImageScalingMode

The scaling mode to use when scaling the image.

Return Value

Type: System.Drawing.Image

The image.

Return to top
Show: