DpiHelper.ScaleLogicalImageForDeviceSize Method
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.
Scale a WPF image to the indicated size, using the specified scalingMode
public:
static System::Windows::Media::ImageSource ^ ScaleLogicalImageForDeviceSize(System::Windows::Media::ImageSource ^ image, System::Windows::Size deviceImageSize, System::Windows::Media::BitmapScalingMode scalingMode);
public static System.Windows.Media.ImageSource ScaleLogicalImageForDeviceSize (System.Windows.Media.ImageSource image, System.Windows.Size deviceImageSize, System.Windows.Media.BitmapScalingMode scalingMode);
static member 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