How to create "design" barcodes?
In This Topic
"Design" barcode is a barcode image, which appearance differs from the traditional black-white barcode image with square cells.
For example:
- the image can include a company logo over the barcode
- the barcode cells can have a nonstandard shape (circle, rhombus, cross, etc)
- some elements of the barcode can have a stylized look
- the barcode image can be multicolored
- the barcode cells can form some picture
The "design" barcodes can be used for:
- Increasing the attractiveness of product package
- Harmonious fit to the design of the product package, site or ad
- Individualization of barcodes for goods or companies
Each two-dimensional barcode has "important" elements, distortion or damage of which will lead to a serious deterioration in the quality of recognition or to the impossibility of recognizing the barcode. Therefore, it is necessary to know about the "important" elements and take them into account when creating a "design" barcode. VintaSoft Barcode .NET SDK can provide information about generated barcode in a special data structure - the
MatrixBarcodeStructure class that stores structure of two-dimentsional matrix barcode (Aztec, QR Code, Micro QR, Data Matrix, Han Xin Code. The barcode structure contains information about all cells of the barcode and allows to determine their "importance" for the recognition process.
Two-dimensional matrix barcode usually consists from the following layers:
While changing the barcode element, it is necessary to take into account the importance of barcode element and the ability to restore the barcode element during the barcode recognition:
-
Search patterns - critical barcode cells, which are used to search for barcode on image. The barcode won't be recognized if the form of barcode cells is significantly distorted or damaged (MatrixBarcodeStructure.IsSearchPattern).
-
Format information - critical barcode cells, which contain service information. Barcode will not be recognized if the form of barcode cells is significantly distorted or damaged (MatrixBarcodeStructure.IsFormatInformation).
-
Alignment patterns - non-critical barcode cells for QR Code, Micro QR, DataMatrix, Han Xin Code; critical barcode cells for Aztec barcodes.
The barcode won't be recognized or the chance to recognize barcode will considerably decrease if the form of its cells is significantly distorted or damaged (MatrixBarcodeStructure.IsAlignmentPattern) or if the barcode image has spatial distortions (for example, the image was taken with low quality from camera of smartphone).
-
Timing patterns - non-critical barcode cells for Aztec, QR Code, Micro QR, Han Xin Code; critical barcode cells for DataMatrix barcodes.
The barcode won't be recognized or the chance to recognize barcode will considerably decrease if the form of barcode cells is significantly distorted or damaged (MatrixBarcodeStructure.IsTimingPattern) or if the barcode image has spatial distortions (for example, the image was taken with low quality from camera of smartphone).
-
Data layer - barcode cells, which contain user data and error correction information (MatrixBarcodeStructure.IsDataLayer).
Data in this layer can be restored using the error correction algorithm. The error correction level defines how many data can be restored. The required error correction level can be calculated using the BarcodeInfo2D.ErrorCorrectionCodewordCount and BarcodeInfo2D.CorrectedErrors properties. You should increase the error correction level for recognized barcode if the value of BarcodeInfo2D.CorrectedErrors property multiplied by 4 is greater than the value of the BarcodeInfo2D.ErrorCorrectionCodewordCount property.
The below picture shows some barcode examples, where each type of barcode cell is specified by separate color (the barcode images were generated by VintaSoft Barcode Demo application):