←Select platform

EnableDpiCorrection Property

Summary

Gets or sets a value that indicates whether the viewer should view images with non-uniform DPI with the correct aspect ratio.

Syntax

C#
VB
Java
Objective-C
WinRT C#
public bool EnableDpiCorrection {get; set;} 
Public Property EnableDpiCorrection As Boolean 
public bool EnableDpiCorrection {get; set;} 
@property (nonatomic, assign) BOOL enableDpiCorrection 
public boolean getEnableDpiCorrection() 
public void setEnableDpiCorrection(boolean enable) 
             
  
get_EnableDpiCorrection(); 
set_EnableDpiCorrection(value); 
Object.defineProperty('EnableDpiCorrection');  

Property Value

true if the viewer should view images with non-uniform DPI with the correct aspect ratio; otherwise, it is false. Default value is true.

Remarks

Changing the value of this property will fire the PropertyChanged and TransformChanged events.

When you set a new image in the viewer, you can also set the image resolution (DPI) into the ImageDpiX and ImageDpiY values. Some images such as FAX documents might have different values for horizontal and vertical resolution done mainly to compress the image during transfer. For example, a FAX TIF image might have 300 as the horizontal resolution and only 150 for the vertical. This image has an aspect ratio of 2/1.

When you set these values in ImageViewer, the image will be displayed squished vertically, since the image contains half the number of scanlines in the vertical direction. Document viewers will usually compensate for that by scaling the display transformation by 2 in the Y direction to correct the aspect ratio back to 1.

When you set EnableDpiCorrection to true, the ImageViewer control will do exactly that and the image will be displayed in the correct aspect ratio.

Requirements

Target Platforms

Help Version 19.0.2017.10.28
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Controls Assembly (WinRT / WPF / iOS / OS X / Android)