In This Topic ▼

Demo Programs

The following demo programs are in separate EXAMPLES subdirectories of the path where you installed your product (<LEADTOOLS_INSTALLDIR>\Examples).

The executable files for these examples were compiled with all LEADTOOLS capabilities unlocked. However, for redeployment, some of these capabilities require a product-specific runtime license. Otherwise, if you recompile the examples, the resulting executable files will not have the locked capabilities.

To unlock and redeploy these capabilities, you must purchase an appropriate product license, such as that included with a LEADTOOLS Document/Medical toolkit and you must provide a runtime license using LSettings::SetLicenseFile.

Demo Description
Examples\FileFormats\ClassLibrary\ABC Demonstrates features of the LEAD Advanced Bitonal Compression (ABC) format.
Examples\Annotation\ClassLibrary\Annotate Demonstrates the Annotation capabilities of the Document/Medical toolkit.
Examples\ImageProcessing\ClassLibrary\Color Loads the 24-bit image file specified on the command line and calls LBitmapBase::ColorRes to optimize and dither the image to 8 bits per pixel.
Examples\ImageProcessing\ClassLibrary\ColorConversion Loads and displays the image file specified on the command line, then uses the LBuffer::ConvertColorSpace function to convert from RGB to YUV, CMYK, and other formats, redisplaying the image after all conversions are complete.
Examples\FileFormats\ClassLibrary\CompCB 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.
Examples\Main\ClassLibrary\DIBDDB Demonstrates the functions that translate to and from Windows device independent bitmaps (DIBs) and device dependent bitmaps (DDBs).
Examples\ImageProcessing\ClassLibrary\Feature1 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.
Examples\ImageProcessing\ClassLibrary\Feature2 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.
Examples\ImageProcessing\ClassLibrary\Feature3 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.
Examples\FileFormats\ClassLibrary\FeedLoad Demonstrates how to use LFile::FeedLoad and related functions by simulating the receipt of a transmitted image.
Examples\ImageProcessing\ClassLibrary\GetRow Loads the 24-bit image file specified on the command line, then rotates the image 90 degrees using LBitmapBase::GetRow and LBitmapBase::PutRowCol, and redisplays the image.
Examples\ImageProcessing\ClassLibrary\ImagePF Demonstrates more of the advanced image processing functions.
Examples\FileFormats\ClassLibrary\Info Displays image information from the file specified on the command line.
Examples\FileFormats\ClassLibrary\Jpx Demonstrates features of the JPX file format.
Examples\FileFormats\ClassLibrary\LoadCB Loads the image file specified on the command line, using a callback function to display the image as it is loaded.
Examples\FileFormats\ClassLibrary\LoadSave 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.
Examples\Main\ClassLibrary\MainDemo The main example program. It uses pull-down menus to demonstrate most of the LEADTOOLS features in one application.
Examples\FileFormats\ClassLibrary\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 LMemoryFile::LoadMemory and displays the image.
Examples\FileFormats\ClassLibrary\MemoryCB 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 LMemoryFile::LoadMemory and a callback function, and displays the image.
Examples\FileFormats\ClassLibrary\Offset Demonstrates the ability to load an image file that is embedded in a larger file. It does so by using the LFile::LoadOffset 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.
Examples\Viewers\ClassLibrary\PaintDC 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.
Examples\SpecialEffects\ClassLibrary\PaintEffects Uses pull-down menus to demonstrate the various transitional painting effects that are available with LEADTOOLS.
Examples\FileFormats\ClassLibrary\Redirect Demonstrates how to use the LBaseFile::EnableRedirectIO function. It redirects the standard I/O functions so that they read and seek into the allocated memory rather than a file.
Examples\ImageProcessing\ClassLibrary\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.
Examples\FileFormats\ClassLibrary\SaveCB 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.
Examples\FileFormats\ClassLibrary\SaveMemory 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.
Examples\Viewers\ClassLibrary\ScrollZoom 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 LPaint::PaintDC function to automatically dither a 16-, 24-, or 32-bit image when displaying on a 4- or 8-bit device.
Examples\FileFormats\ClassLibrary\SimpleLoad Demonstrates simple load and display functionality.
Examples\FileFormats\ClassLibrary\StampGet 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.)
Examples\FileFormats\ClassLibrary\StampPut Loads the image file specified on the command line, calls LBitmapBase::ColorRes (if necessary) to obtain a 24 bit image, callsLFile::SaveFile to compress the image to STAMP.CMP (a LEAD CMP compressed file format), then loads the stamp to a bitmap and displays the stamp.
Examples\Viewers\ClassLibrary\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.

For more code samples, refer to:

Help Version 22.0.2021.9.12
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help