ImageGear for .NET
Scaling Modes

ImageGear provides two approaches for image display scaling. The application can use either of these approaches, depending on its requirements.

ImageGear allows using either scaling mode for both the image and the annotations. You can use same mode for both the image and the annotations, or different modes in any combination. By default, ImageGear uses the ImageGear scale mode for the image, and WPF scale mode for the annotations.

ImageGear Scale Mode

In this mode, ImageGear performs all geometric transformations. This is the same approach that ImageGear uses with GDI+. Result image dimensions are calculated according to desired display size, in device-independent units, and display device resolution, specified via ImGearNativeDisplayScaleSettings.Resolution Property. When using a DrawToCanvas Method or DrawToBitmapImage Method that does not accept an ImGearRenderSettings Class parameter, ImageGear assumes the device resolution to be 96 dpi (default display resolution in Windows).

Use this approach is you prefer ImageGear to do the scaling. The benefits are:

WPF Scale Mode

In this mode, ImageGear does not perform any scaling. It outputs the image in its original size, and uses WPF transforms to position and scale the image. Use this approach if you prefer WPF to handle scaling.

In WPF scale mode, ImageGear does not need to redraw the image for zooming, scrolling, or layout updating. It only updates the geometric transform of the image element. To let ImageGear know that only a layout update is necessary, set ImGearWpfDisplayScaleSettings.UpdateLayoutOnly Property to true.

The benefits of this approach are:

Use ImGearRenderSettings.ImageScaleSettings Property to specify the scaling mode for image rendering. 

 

 


©2014. Accusoft Corporation. All Rights Reserved.

Send Feedback