Display
Display - LEADTOOLS renders an image of any color depth (1 to 32 bit) to any display device, automatically handling any color reduction or expansion. Intensity, contrast and gamma correction changes can be applied to the display without affecting the original data. Images can be automatically dithered to match the output display device on the fly, without changing the image in memory. Images can be scaled, zoomed, or scrolled when displayed. You can render images with a color specified as transparent.
You can position the displayed image, and zoom in or out by scaling and cropping the display. The rotated display feature (Document/Medical toolkits only) allows rendering images rotated in 90-degree increments without changing the image in memory. Large 1-bit images can remain compressed in memory while decompressing only the portion needed for display. On a 256-color device, you can use a fixed palette option to eliminate palette shifting when displaying more than one image at a time in your application. Many images displayed in the main window may require scrolling. To display a scaled view of such a bitmap, you can use a PanWindow.
LEADTOOLS also lets you display and manipulate a list of images using the ImageList Control. In addition, LEADTOOLS provides a thumbnail browser for browsing entire directories for image files supported by LEADTOOLS.
LEADTOOLS Document/Medical toolkits include specialized display filters including favor black and scale to gray, which allow you to enhance and "clean up" 1 bit images. LEADTOOLS Medical Imaging display support adds 9-16 bit grayscale, and 12 and 16 bit display with window leveling.
When painting images on any video device, you can do the following:
Get and set properties that control the behavior of the LEAD control.
Control the brightness, contrast, and gamma correction when painting (without affecting the bitmap).
Get the client area of the LEAD control.
Define the client area as a display surface where you can use Windows graphics device interface (GDI) functions for drawing or adding text.
[ActiveX and VCL only] Display a rubberband to mark an area.
[ActiveX and VCL only] Zoom in on a selected area.
Force repainting of the image in a LEAD control.
Scale and position the image. This lets you zoom in or out, fit the image to a window, and position the image in a window.
Limit the area to be painted by specifying the source and destination cropping areas.
Apply special effects.
Apply ROP codes, which determine how to interact with the existing image on the screen.
[DLL only] Use a buffer as the source to paint from.
[DLL only] Specify an option for fast painting (without device error checking).
If the display mode is 256 colors or less, you can do the following:
Use the palette in the bitmap handle or use a fixed palette. You can specify LEAD's fixed palette or the Netscape fixed palette.
Specify the dithering method, for images that have more bits per pixel than the current video mode. The following are possible options:
Normal dithering (using error diffusion).
Ordered dithering, which is faster but less accurate than normal.
[DLL only] No dithering, which relies on the display device for color reduction.
For displaying 1-bit (black-and-white) images, you can do the following to enhance the quality of display:
[Document/Medical only] Specify a scale-to-gray option, which increases the clarity of the 1-bit images when they are scaled (zoomed in or zoomed out).
[Document/Medical only] Specify a favor-black option, which prevents loss of details, such as fine lines, when an image is scaled down (zoomed out).