Zooming Techniques in the Document Imaging SDK

There are several possibilities in the Document Imaging SDK for zooming images:

 Zoom property

 ZoomArea method

 SelectImageArea property


Usage of the Zoom Property

The Zoom property is available in the BiDisp.ocx control. If you set this property to TRUE you enter a zoom mode. In the zoom mode you can select the zooming area with the mouse. In this case user interaction starts the zooming. You can zoom in and zoom out of the image while in zoom mode.

BiDisp.Zoom = True

Usage of the ZoomArea Method

The BiDisp.ocx also contains this method. The ZoomArea method zooms the image programatically. The zooming area is given as parameters of the ZoomArea method. You have to specify the left, top, bottom, and right coordinates of the zooming rectangle.  These coordinates are given in client coordinates.


BiDisp.ZoomArea Left, Top, Right, Bottom


Usage of the SelectImageArea Property

This property is also a part of the BiDisp.ocx control. If this property is TRUE, you can select an area on the image using the mouse. If you selected a rectangle and released a mouse button 2 events


will be raised: SelectClientArea and SelectImgArea. The SelectClientArea event gives the coordinates of the selected rectangle in clients coordinates. The SelectImgArea event gives the coordinates of the selected rectangle in image coordinates. So if you want to combine the SelectImageArea property with the ZoomArea method, you should use the SelectClientArea event, because the ZoomArea method requires the parameters in client coordinates.


Private Sub BiDisp_SelectClientArea(ByVal Left As Long, ByVal Top As Long, ByVal Right As Long, ByVal Bottom As Long)

    BiDisp.ZoomArea Left, Top, Right, Bottom

End Sub



The ZoomArea method is similar to the Zoom property, the only difference is the ZoomArea method zooms an area without user activity.


When using the Zoom property, the user has to select an area with mouse to zoom. When using the ZoomArea method, the coordinates of the area to zoom must be passed as parameters. The coordinates are relative to the upper-left corner of the window.

Page 1 Page 2 Page 3