bardecode.com
barcode reading software
  • Home
  • Download
  • Purchase
  • SDK Licensing
  • Pricing
    • Windows SDK Price List
    • Windows SDK with PDF Extension Price List
    • Linux SDK Price List
    • Linux SDK with PDF Extension Price List
    • PDF Extension For Windows Price List
    • Multi-Platform Toolkit for .NET Price List
    • BardecodeFiler Desktop Only Price List
    • BardecodeFiler Windows Service Price List
    • DOS Command Prompt Barcode Tool Price List
    • Terms and Conditions
    • Refund Policy
  • Products
    • Softek Barcode Reader Toolkit for Windows
    • Softek Barcode Reader Toolkit for Linux
    • BardecodeFiler Desktop App
    • BardecodeFiler Windows Service
    • Windows DOS Command Prompt Tool
    • Multi-platform barcode reader toolkit for .NET
    • Aquaforest’s Autobahn DX
  • Knowledge Base
    • Documentation
    • Specifications
  • News
  • Contact
    • About Us
    • Terms and Conditions
    • Resellers
    • Links
Select Page ...

News

Minimum width and height for barcodes in images

admin November 23, 2012 Image, Knowledge Base No Comments

The main requirement is for each black or white bar in a barcode to be clearly visible on the image. All barcodes have at least 2 sizes of bar and the image needs to be of high enough quality to show this. For example, a Code 39 barcode consists of 9 bars per character, of which 3 must be wide and 6 must be narrow. The wide bars should be around 2.5 times the size of the narrow bars – but for simplicity we will say 2 times the size. This means that each character needs at least 12 pixels in an image. This assumes that each pixel in the image lies either entirely in a black bar or entirely in a white bar. In practise, this isn’t possible and so the resolution should allow around 24 pixels per character.

So, to encode a string of 10 characters (not including the start and stop *) you will need at around 288 pixels. If the barcode is 1 inch wide on the paper then you will need to scan at a resolution of around 300 DPI. If the barcode is 2 inches wide then you will need to scan at a resolution of around 200 DPI.

Some types of barcode have more than 2 widths of bar and a higher resolution still will be needed to ensure that the different widths can be distinguished on the image.

As for barcode height – if you have a very wide barcode then you need to ensure that it is high enough to cope with any skewing that takes place when the image is scanned.

In summary – the success of a project can depend on specifying the correct barcode size and image resolution.

Barcode Type Number of Characters Minimum Number of Pixels (approx)
Code 39 10 288
Code 2 of 5 (interleaved) 10 156
Code 128 (code set A) 10 286
Code 128 (code set B) 10 286
Code 128 (code set C) 10 176
EAN-13 13 166
EAN-8 8 118
UPC-A 12 166
UPC-E 8 102
← Softek Software Announce Support for Cormorant RT
SoftekBarcodeLib2.dll System.IO.FileLoadException →
admin

  • Copyright © 2023 Softek Software Ltd. All Rights Reserved