Partager via


DpiHelper.ScaleLogicalImageForDeviceSize Method

Definition

Scale a WPF image to the indicated size, using the specified scalingMode

public:
 System::Windows::Media::ImageSource ^ ScaleLogicalImageForDeviceSize(System::Windows::Media::ImageSource ^ image, System::Windows::Size deviceImageSize, System::Windows::Media::BitmapScalingMode scalingMode);
public System.Windows.Media.ImageSource ScaleLogicalImageForDeviceSize (System.Windows.Media.ImageSource image, System.Windows.Size deviceImageSize, System.Windows.Media.BitmapScalingMode scalingMode);
member this.ScaleLogicalImageForDeviceSize : System.Windows.Media.ImageSource * System.Windows.Size * System.Windows.Media.BitmapScalingMode -> System.Windows.Media.ImageSource
Public Function ScaleLogicalImageForDeviceSize (image As ImageSource, deviceImageSize As Size, scalingMode As BitmapScalingMode) As ImageSource

Parameters

image
ImageSource

The image to scale

deviceImageSize
Size

The resultant image size

scalingMode
BitmapScalingMode

The BitmapScalingMode to be used during image resize

Returns

The scaled up image

Applies to