Click here to Skip to main content
15,891,136 members
Articles / Product Showcase

How to Read Barcodes from Images using LEADTOOLS

7 Jan 2013CPOL3 min read 57.8K   2.3K   25  
In this article, we will create a simple application that loads an image and reads its barcodes. Try it out for yourself by downloading a fully functional evaluation SDK from the links provided below the tutorial.

This article is in the Product Showcase section for our sponsors at CodeProject. These articles are intended to provide you with information on products and services that we consider useful and of value to developers.

namespace LEADTOOLSBarcodeTutorial
{
   partial class Form1
   {
      /// <summary>
      /// Required designer variable.
      /// </summary>
      private System.ComponentModel.IContainer components = null;

      /// <summary>
      /// Clean up any resources being used.
      /// </summary>
      /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
      protected override void Dispose(bool disposing)
      {
         if (disposing && (components != null))
         {
            components.Dispose();
         }
         base.Dispose(disposing);
      }

      #region Windows Form Designer generated code

      /// <summary>
      /// Required method for Designer support - do not modify
      /// the contents of this method with the code editor.
      /// </summary>
      private void InitializeComponent()
      {
         this.btnLoad = new System.Windows.Forms.Button();
         this.btnRead = new System.Windows.Forms.Button();
         this.rasterImageViewer1 = new Leadtools.WinForms.RasterImageViewer();
         this.txtResults = new System.Windows.Forms.TextBox();
         this.SuspendLayout();
         // 
         // btnLoad
         // 
         this.btnLoad.Location = new System.Drawing.Point(12, 12);
         this.btnLoad.Name = "btnLoad";
         this.btnLoad.Size = new System.Drawing.Size(90, 23);
         this.btnLoad.TabIndex = 0;
         this.btnLoad.Text = "Load Image";
         this.btnLoad.UseVisualStyleBackColor = true;
         this.btnLoad.Click += new System.EventHandler(this.btnLoad_Click);
         // 
         // btnRead
         // 
         this.btnRead.Location = new System.Drawing.Point(108, 12);
         this.btnRead.Name = "btnRead";
         this.btnRead.Size = new System.Drawing.Size(90, 23);
         this.btnRead.TabIndex = 1;
         this.btnRead.Text = "Read Barcodes";
         this.btnRead.UseVisualStyleBackColor = true;
         this.btnRead.Click += new System.EventHandler(this.btnRead_Click);
         // 
         // rasterImageViewer1
         // 
         this.rasterImageViewer1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                     | System.Windows.Forms.AnchorStyles.Left)
                     | System.Windows.Forms.AnchorStyles.Right)));
         this.rasterImageViewer1.Location = new System.Drawing.Point(12, 41);
         this.rasterImageViewer1.Name = "rasterImageViewer1";
         this.rasterImageViewer1.Size = new System.Drawing.Size(414, 472);
         this.rasterImageViewer1.SizeMode = Leadtools.RasterPaintSizeMode.Fit;
         this.rasterImageViewer1.TabIndex = 2;
         // 
         // txtResults
         // 
         this.txtResults.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                     | System.Windows.Forms.AnchorStyles.Right)));
         this.txtResults.Location = new System.Drawing.Point(432, 41);
         this.txtResults.Multiline = true;
         this.txtResults.Name = "txtResults";
         this.txtResults.ReadOnly = true;
         this.txtResults.Size = new System.Drawing.Size(190, 472);
         this.txtResults.TabIndex = 3;
         // 
         // Form1
         // 
         this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
         this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
         this.ClientSize = new System.Drawing.Size(634, 525);
         this.Controls.Add(this.txtResults);
         this.Controls.Add(this.rasterImageViewer1);
         this.Controls.Add(this.btnRead);
         this.Controls.Add(this.btnLoad);
         this.Name = "Form1";
         this.Text = "LEADTOOLSBarcodeDemo";
         this.ResumeLayout(false);
         this.PerformLayout();

      }

      #endregion

      private System.Windows.Forms.Button btnLoad;
      private System.Windows.Forms.Button btnRead;
      private Leadtools.WinForms.RasterImageViewer rasterImageViewer1;
      private System.Windows.Forms.TextBox txtResults;
   }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Help desk / Support LEAD Technologies, Inc.
United States United States
Since 1990, LEAD has established itself as the world's leading provider of software development toolkits for document, medical, multimedia, raster and vector imaging. LEAD's flagship product, LEADTOOLS, holds the top position in every major country throughout the world and boasts a healthy, diverse customer base and strong list of corporate partners including some of the largest and most influential organizations from around the globe. For more information, contact sales@leadtools.com or support@leadtools.com.
This is a Organisation (No members)


Comments and Discussions