Example Programs
The following example programs are in separate EXAMPLES subdirectories (such as C:\LEAD14\EXAMPLES\DLL\COLOR). The executable files for these examples were compiled with Document/Medical capabilities of the toolkit. To get Document/Medical capabilities, you must buy the LEADTOOLS Document/Medical toolkit. Otherwise, if you recompile the examples, the resulting executable files will not have the Document/Medical capabilities.
To run the example programs, LEADTOOLS must be installed on your system. The EXEs for these example programs can be found in the LEAD\BIN directory, where LEAD represents the directory in which LEADTOOLS was installed. The source code for these demos can be found in sub-directories of the LEAD\EXAMPLES directory.
ANNOTATE |
Annotations demonstrates the annotation capabilities of the Document/Medical toolkit. |
|
|
CLRSPACE |
Color Space loads and displays the image file specified on the command line, then uses the L_ConvertColorSpace function to convert from RGB to YUV, CMYK, and other formats, redisplaying the image after all conversions are complete. |
|
|
COLOR |
Color Resolution loads the 24-bit image file specified on the command line and calls L_ColorResBitmap to optimize and dither the image to 8 bits per pixel. |
|
|
COMPCB |
Compress Callback loads the image file specified on the command line, then displays the image, compresses the bitmap to file using a callback function, clears the bitmap, loads the compressed image, and displays the newly loaded image. |
|
|
DELPHI |
Delphi Demo demonstrates the use of LEADTOOLS with the Borland Delphi development system. |
|
|
DEMO |
Main Demo is the main example program. It uses pull-down menus to demonstrate most of the LEADTOOLS features in one application. |
|
|
DIBDDB |
DIBDDB Demo demonstrates the functions that translate to and from Windows device independent bitmaps (DIBs) and device dependent bitmaps (DDBs). |
|
|
DRAW |
Draw Demo uses pull-down menus to show some of the drawing capabilities available with LEADTOOLS. |
|
|
EZFUNC |
Simple Load uses simple LEADTOOLS functions to load an image file specified on the command line and display the bitmap in a window. |
|
|
EZREGC |
Reg. Class Load uses the L_BITMAPCLASS registered class to load an image file specified on the command line and display the bitmap in a window. |
|
|
FEATURE1 |
Some Basic Features loads and displays the 24-bit image file specified on the command line, then makes the following changes, redisplaying the image after each change: optimize to 8 bits per pixel, flip, lighten, resize, and rotate. |
|
|
FEATURE2 |
More Basic Features loads and displays the 24-bit image file specified on the command line, then makes the following changes, redisplaying the image after each change: dither to 8 bits per pixel, reverse, grayscale, resize, and fill with one color. |
|
|
FEATURE3 |
A Few More Features loads and displays the image file specified on the command line, copies the image data to a different bitmap, halftones the original image, restores the image by copying the handle of the new bitmap, then redisplays the image. |
|
|
FEEDLOAD |
Feed Load demonstrates how to use L_FeedLoad and related functions by simulating the receipt of a transmitted image. |
|
|
FPXDEMO |
FlashPix Demo is the main example program for the FlashPix support. It uses pull-down menus to demonstrate most of the LEADTOOLS FlashPix features in one application. |
|
|
GETROW |
Get Row loads the 24-bit image file specified on the command line, then rotates the image 90 degrees using L_GetBitmapRow and L_PutBitmapRowCol, and redisplays the image. |
|
|
INFO |
Info displays image information from the file specified on the command line. |
|
|
ISAPI |
LEADTOOLS ISAPI Extension example demonstrates using LEADTOOLS API in an ISAPI Server Extension. For more information on how to use this sample, refer to ISAPI Example. |
|
|
LOADCB |
Load Callback loads the image file specified on the command line, using a callback function to display the image as it is loaded. |
|
|
LOADSAVE |
Load and Save uses pull-down menus to let the user load an image file, display the image in a window, and save the image to a specified file name, format, and bits per pixel. The options are implemented using a Windows common dialog box. |
|
|
MEMORY |
Load Memory demonstrates the ability to load a file from memory. It allocates memory, loads the image file specified on the command line into the allocated memory, then loads the image from memory to a bitmap using L_LoadBitmapMemory and displays the image. |
|
|
MEMORYCB |
Load Memory Callback demonstrates the ability use a callback function when loading a file from memory. It allocates memory, loads the image file specified on the command line into the allocated memory, then loads the image from memory to a bitmap using L_LoadMemory and a callback function, and displays the image. |
|
|
MFCDEMO |
MFC Demo demonstrates the use of LEADTOOLS with the Microsoft Foundation Class (MFC). This example includes a C++ wrapper for the LEADTOOLS API. |
|
|
MFCFPX |
MFC FlashPix Demo demonstrates the LEADTOOLS FlashPix support, with the Microsoft Foundation Class (MFC). |
|
|
MFCFX |
Special Effects MFC Demo demonstrates the LEADTOOLS special effects, including paint effects, transitions, three-dimensional text, and three-dimensional shapes. |
|
|
OFFSET |
Load Save Offset demonstrates the ability to load an image file that is embedded in a larger file. It does so by using the L_LoadFileOffset function, which lets you specify the offset and the size of the embedded file. This example first loads the normal image file specified on the command line. It embeds the image in a second file, which is specified in the second command line argument. It then loads and displays the embedded file. |
|
|
PAINTDC |
Paint DC loads the image file specified on the command line, and displays the image. The user can then choose a menu option to modify the source and display rectangles, and redisplay the image to see the changes. |
|
|
PAINTEFF |
Paint Effect Demo uses pull-down menus to demonstrate the various transitional painting effects that are available with LEADTOOLS. |
|
|
REDIRECT |
Redirect I/O demonstrates how to use the L_RedirectIO function. It redirects the standard I/O functions so that they read and seek into the allocated memory rather than a file. |
|
|
REGCLASS |
Registered Class Demo demonstrates most of the capabilities of L_BITMAPCLASS registered class. |
|
|
RESIZE |
Resize loads the image file specified on the command line, resizing the image while loading it. It then places the resized image over the original and displays the combined image. |
|
|
SAVECB |
Save Callback loads the image file specified on the command line, then displays the image and saves it to the current directory using a callback and status window. |
|
|
SAVEMEM |
Save to Memory demonstrates the ability to save a file in memory. It lets the user load an image file, display the image in a window, and save the image to a file in memory. |
|
|
SCRLZOOM |
Scroll & Zoom Demo uses pull-down menus to let the user load an image file, display the image in a window, and use zooming and scrolling features. In doing so, it also demonstrates the ability of the L_PaintDC function to automatically dither a 16-, 24-, or 32-bit image when displaying on a 4- or 8-bit device. |
|
|
STAMPGET |
Get Stamp reads a thumbnail (stamp) image stored in a compressed file that the user selects; then displays the image in a window. The only valid input file is a LEAD or JPEG file that is compressed with a stamp image. (Use the STAMPPUT example first to create an image file that contains a thumbnail.) |
|
|
STAMPPUT |
Put Stamp loads the image file specified on the command line, calls L_ColorResBitmap (if necessary) to obtain a 24 bit image, calls L_CompressBitmapWithStamp to compress the image to STAMP.CMP (a LEAD CMP compressed file format), then loads the stamp to a bitmap and displays the stamp. |
|
|
THREAD |
Multi-thread reads and displays all files from the directory specified on the command line. It creates a new thread to load images while the main thread paints the last image that was loaded. When the last image is loaded, the example uses the last image to cycle through the paint effects. The multi-thread feature works only on WIN32 systems. |
|
|
UNDERLAY |
Underlay demonstrates the L_UnderlayBitmap function. It loads two images specified on the command line and displays the first one. It then combines the images using the second one as an underlying image, and displays the combined image. |
|
|
WARPING |
Warping demonstrates the L_CombineBitmapWarp function. It lets you load a master image and a slave image and, through the use of a polygon annotation, select the area of the master image to which to warp the slave image. For more information on using this demo, refer to Using the Image Warping Demo. |
|
|
ZOOMVIEW |
ZoomView demonstrates the zoom view functionality. It lets you load an image and, zoom any portion of the image. As long as the user moves the rectangle of the selected portion to be zoomed, the zoom view window will zoom that portion. In addition, the user can create multiple zoom views. |