Use LEADTOOLS .NET Image SDK to draw and edit annotations

LEADTOOLS Recognition Imaging SDK is a selected LEADTOOLS SDK feature set designed to build end-to-end document imaging applications in enterprise-level document automation solutions. These solutions require OCR, MICR, OMR, barcode, form recognition and processing, PDF , Print capture, archive, annotation and image viewing functions. This powerful tool utilizes LEAD's award-winning image processing technology to intelligently recognize document functions that can be used to identify and extract any type of scanned or faxed image data.

Click to download the LEADTOOLS Recognition Imaging SDK trial version [Huidu.com]

No matter what your image processing needs are, LEADTOOLS has the world's leading SDK to complete all the heavy work. In previous articles, we discussed viewing images, saving images, combining images into one file, and splitting one file into multiple images. LEADTOOLS can also draw and edit annotations and markup objects on the image.
Use LEADTOOLS .NET Image SDK to draw and edit annotations

In today's world full of digital collaboration and image sharing, comprehensive annotation support is essential. People and organizations use various types of annotations throughout the day to draw attention to specific aspects of images or documents and enhance user experience, productivity, and security. The LEADTOOLS annotation library supports marking objects and tools, including highlighting, referring to drawings, adding annotations, making measurements, redacting or underlined text, and more powerful collections.

The code below will help you get started, or you can always check out our complete tutorial on graphical annotations. We will also explain how to create custom annotations for your documents or images.

private void Form1_Load(object sender, EventArgs e)
{
// Initialize Image Viewer object
viewer = new ImageViewer();
viewer.Dock = DockStyle.Fill;

// Initialize Automation Control for Image Viewer
automationControl = new ImageViewerAutomationControl();
automationControl.ImageViewer = viewer;

// Initialize a new RasterCodecs object
RasterCodecs codecs = new RasterCodecs();

// Load the main image into the viewer
viewer.Image = codecs.Load(@"C:\LEADTOOLS21\Resources\Images\ocr1.tif");

// Initialize the Interactive Mode for the Image Viewer
AutomationInteractiveMode automationInteractiveMode = new AutomationInteractiveMode();
automationInteractiveMode.AutomationControl = automationControl;

// Add the Interactive Mode to the Image Viewer
viewer.InteractiveModes.BeginUpdate();
viewer.InteractiveModes.Add(automationInteractiveMode);
viewer.InteractiveModes.EndUpdate();

if (viewer.Image != null)
{
// Create and set up the Automation Manager
annAutomationManager = new AnnAutomationManager();
annAutomationManager.RestrictDesigners = true;

// Instruct the Manager to create all the default Automation objects.
annAutomationManager.CreateDefaultObjects();

// Initialize the Manager Helper and create the Toolbar
// Add the Toolbar and the Image Viewer to the Controls
AutomationManagerHelper managerHelper = new AutomationManagerHelper(annAutomationManager);
managerHelper.CreateToolBar();
Controls.Add(managerHelper.ToolBar);
Controls.Add(viewer);

// Set up the Automation (it will create the Container as well)
automation = new AnnAutomation(annAutomationManager, automationControl);
// Set this Automation as the active one
automation.Active = true;

// Set the size of the Container to the size of the Image Viewer
automation.Container.Size =
automation.Container.Mapper.SizeToContainerCoordinates(LeadSizeD.Create(viewer.Image.ImageWidth,
viewer.Image.ImageHeight));
}
}

To test it yourself, make sure to download the latest LEADTOOLS SDK evaluation (if you have not already downloaded it). The trial version is valid for 60 days and provides unlimited chat and email support.

If you want to purchase LEADTOOLS genuine license, or for more product information, please [Huidu Consulting Online Customer Service]

Guess you like

Origin blog.51cto.com/14874181/2575705