ImageGear Professional for Windows ActiveX
IGPageDisplay Functions

IGPageDisplay Object provides over 50 display-related properties and methods. All of the methods, and most of these properties, are used by your application program to control the way the image is displayed in your application.

The following IGPageDisplay Object properties and methods affect the display of an image only, not the image itself (as contained in the IGPage Object). They do not alter the image bitmap, and they do not change the color palette in the DIB. To alter the image itself, use the Image Manipulation facilities of ImageGear, described below.

A few of these properties are "read-only", and provide information about the rendered image to your application. The IGPageDisplay Object properties are grouped into data-value objects as a way to organize them. The data-value objects, and the properties that they contain, are as follows (for complete descriptions of these properties and methods, see the Display Component API Reference):

IGDisplayAntiAlias Object Properties used to make scanned text more readable, by removing or minimizing the "aliasing" (jagged edges of characters and other thin lines). For example: Original Image
With AntiAliasing

These properties can be referenced directly, using the AntiAliasing property of IGPageDisplay Object:
IGPageDisplay.AntiAliasing.Meth
od = IG_DSPL_ANTIALIAS_NONE
Dim method as enumAliasModes
method =
IGPageDisplay.AntiAliasing.Meth
od
IGDisplayBackground Object Controls the appearance of the area that is inside IGPageViewCtl Control, but outside of the displayed image. For example: Default Background

"Brush" Background

Your application can set the background to a solid color, or use some other image as a "brush" to paint the background. These properties can be referenced directly, using the Background property of IGPageDisplay Object:
IGPageDisplay.Background.Mode =
IG_DSPL_BACKGROUND_NONE
Dim mode as enumBackgroundModes
mode =
IGPageDisplay.Background.Mode
IGDisplayScrollInfo Object Controls the way that a portion of a large image is visible within the smaller IGPageViewCtl Control. Scrolling can either be automatic (ImageGear takes care of it) or manual (your application has to react to mouse events and tell IGPageDisplay Object how to position the image). The scroll properties are all inter-related, and so they are "gotten" from IGPageDisplay Object as a group, and they are "updated" in IGPageDisplay Object as a group. Access them as follows:
Dim info as IGDisplayScrollInfo
Set info =
IGPageDisplay.GetScrollAttrs(IG
PageViewCtl1.hWnd)
Dim mode as
enumIGDsplScrollBarModes
mode = info.H_Mode Change the properties as follows: :
info.H_Mode = IG_DSPL_SB_AUTO
info.V_Mode = IG_DSPL_SB_AUTO
IGPageDisplay.UpdatetScrollAttr
sFrom IGPageViewCtl1.hWnd, info
IGDisplayZoomInfo Object Controls the way that an image is magnified before being displayed in the IGPageViewCtl Control. For example: Actual Size
300% Zoom

The zoom properties are all inter-related, and so they are "gotten" from IGPageDisplay Object as a group, and they are "updated" in IGPageDisplay Object as a group. Access them as follows:
Dim info as IGDisplayZoomInfo
Set info =
IGPageDisplay.GetZoomInfo(IGPag
eViewCtl1.hWnd)
Dim mode as enumZoomModes
mode = info.Mode Change the properties as follows: :
info.HZoom = 1.3#
info.Zoom = 1.3#
IGPageDisplay.UpdatetZoomFrom
info
IGDisplayPalette Object This is a palette in OS-dependent format. This palette is implemented before drawing pixels onto the output device. By default, this option is NULL, which means that it is created either from the logical palette of the image, or from the logical palette used in dithering. ImageGear does not perform logical processing of the specified palette; it implements it only before drawing it. Incorrect usage of this option, therefore, may distort the image on the destination device. You can use this object to store a palette to a file, and then later reload it for use in a different image. The palette properties are all inter-related, and so they are "gotten" from IGPageDisplay Object as a group, and they are "updated" in IGPageDisplay Object as a group. Access them as follows:
Dim palette as IGDisplayPalette
Set palette =
IGPageDisplay.GetPaletteData
Dim mode as enumPaletteModes
mode = palette.Mode
Change the properties as follows: :
palette.Mode =
IG_DSPL_PALETTE_HIGH
palette.Palette = XXX
IGPageDisplay.UpdatetPaletteFro
m palette
IGDisplayLayout Object Controls the geometric appearance (full image or partial image, centered or not, etc.) of the image as displayed in IGPageViewCtl Control. Layout settings include 3 rectangles (ImageRect, ClipRect and DeviceRect) that can be used to control the layout of the image as rendered - see ImageRect, ClipRect and DeviceRect, below for a description of these rectangles. Normally your application won't reference these rectangles, as they default to the size of the image and the size of the IGPageViewCtl Control, respectively. The most commonly used layout properties are Alignment and FitMode: Align: Left_Top
Fit: To_Window_Height
These properties can be referenced directly, using the Layout property of IGPageDisplay Object:
IGPageDisplay.Layout.FitMode =
IG_DSPL_ACTUAL_SIZE
Dim mode as enumFitModes
mode =
IGPageDisplay.Layout.FitMode
IGDisplayMapMode Object These options are device-dependent. They allow you to set logical coordinates. All coordinates, except for ImageRect, are logical; these options are necessary to properly convert logical coordinates to device coordinates. For Windows platforms, the value of MapMode can be anything accepted by the GDI's functions GetMapMode/SetMapMode. The Viewport and Window contain values that are the same as the GDI's SetViewportOrgEx/SetViewportExtEx and SetWindowOrgEx/ SetWindowExtEx options. These properties can be referenced directly, using the MapMode property of IGPageDisplay Object:
IGPageDisplay.MapMode.Mode =
IG_DSPL_MM_HIMETRIC
Dim mode as enumIGDsplMapModes
mode =
IGPageDisplay.MapMode.Mode
IGDisplayTransparency Object Used to control transparency handling as the image is rendered. ImageGear display functionality supports transparency by color and by mask. Transparency by color means that it is possible to draw images with a specified color being transparent. Transparency by mask provides a one-bit per pixel image and uses it as the transparent mask. These properties can be referenced directly, using the Transparency property of IGPageDisplay Object:
IGPageDisplay.Transparency.Mode
= IG_DSPL_TRANSPARENCY_MASK
 Dim mode as enumTranspOptions
 mode =
IGPageDisplay.Transparency.Mode
LUT The LUT (an IGPixelArray Object) actually defines a mathematical function that is used to convert the image color/intensity into the rendered color/intensity. "LUT" stands for "LookUp Table" - IGPageDisplay Object uses the intensity of a given image pixel as an index into the table, and uses the value of that table-entry as the intensity and/or color for the pixel as rendered. IGPageDisplay Object recalculates the LUT every time your application calls AdjustContrast(), so your application normally won't access the LUT. See "Lookup Tables and Gamma Correction" below for more information on LUT usage. The LUT is accessed as follows:
Dim lut as IGPixelArray
Set lut =
IGPageDisplay.GetLUTCopy(IG_COL
OR_COMP_RGB)
Change the LUT as follows: :
IGPageDisplay.UpdatetLUTFrom
lut, IG_COLOR_COMP_RGB

A few display properties are contained directly in the IGPageDisplay Object. They are:

Dithering Property Controls the way that high-bit-depth images are rendered to lower bit-depth (e.g., for printing a color image on a black-and-white printer). For example: Original Image
Dithered to Monochrome

These properties can be referenced directly:
IGPageDisplay.Dithering =
IG_DSPL_DITHER_TO_1BPP
Dim mode as enumDitherModes
method = IGPageDisplay.Dithering
Orientation Property Another control that determines the geometric appearance of the image as displayed in IGPageViewCtl Control. For example: BOTTOM_RIGHT
RIGHT_BOTTOM

These properties can be referenced directly:
IGPageDisplay.Orientation =
IG_ORIENT_LEFT_TOP
Dim orientation as enumOrientation
orientation = IGPageDisplay.Orientation

Beside the data-value objects and the display properties, there are a number of methods in IGPageDisplay Object that can be used to change the way that the IGPage Object image is rendered:

AdjustContrast Method Used to change the contrast, brightness and gamma-correction values for the rendered image.
  • Contrast specifies the contrast level to produce. Values greater then 1.0 increase contrast, values less than 1.0 decrease contrast. Values less than 0.0 will invert contrast (exchange dark and light). The default value is 1.0.
  • Brightness specifies the brightness adjustment. The values range from -255.0 to +255.0. The default value is 0.0.
  • Gamma controls the non-linear contrast adjustment. Values greater then 1.0 increase contrast, values less than 1.0 decrease it. The normal range is from 1.8 to 2.2. The default value is 1.0.
Some example values are: C 1.0, B 0.0, G 1.0
C 1.0, B 128.0, G 1.0
C -1.0, B 0.0, G 1.0
C 1.0, B 128.0, G 0.7

ScrollTo Method An alternate mechanism for scrolling the image.
ZoomToRectangle Method An alternate mechanism for setting the zoom properties.

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback