DpiHelper.CreateDeviceFromLogicalImage Method (Bitmap, Size, 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.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function CreateDeviceFromLogicalImage ( _
logicalBitmapStrip As Bitmap, _
logicalImageSize As Size, _
scalingMode As ImageScalingMode _
) As Bitmap
public static Bitmap CreateDeviceFromLogicalImage(
this Bitmap logicalBitmapStrip,
Size logicalImageSize,
ImageScalingMode scalingMode
)
[ExtensionAttribute]
public:
static Bitmap^ CreateDeviceFromLogicalImage(
Bitmap^ logicalBitmapStrip,
Size logicalImageSize,
ImageScalingMode scalingMode
)
static member CreateDeviceFromLogicalImage :
logicalBitmapStrip:Bitmap *
logicalImageSize:Size *
scalingMode:ImageScalingMode -> Bitmap
public static function CreateDeviceFromLogicalImage(
logicalBitmapStrip : Bitmap,
logicalImageSize : Size,
scalingMode : ImageScalingMode
) : Bitmap
Parameters
logicalBitmapStrip
Type: BitmapThe logical bitmap strip.
logicalImageSize
Type: SizeThe size of the logical image.
scalingMode
Type: Microsoft.VisualStudio.PlatformUI.ImageScalingModeThe scaling mode to use when scaling the image.
Return Value
Type: Bitmap
The image.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Bitmap. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.