B.8 barcode vector graphics, B.9 code examples for barcode optimization – Konica Minolta Darwin VDP Software User Manual

Page 85

Advertising
background image



Page 85 of 92

T EC - I T B a r c o d e So f t w a re R e f e re n c e

Additional considerations:

If you do not know the resolution of the target printer it is a good approximation to use a
sufficiently high image resolution (e.g. 600 dpi). In any case the barcode image should be
optimized with respect to the image pixels (see step 4!).

If you want to save space and therefore intend to create smaller images (e.g. for web
applications) you can do that. In this case you should take care, that after up-scaling to the
printer resolution, the barcode can be printed with whole printer dots (see also the example
in section B.9.3).

Remark:

Another method to get optimal printouts would be to generate all barcode images with exactly 1
pixel module width. Such images have an optimal barcode quality and can be up-scaled to any re-
quired size. Since you do not know if the printer driver uses anti-aliasing (and produces half-tones)
when up-scaling an image, or if you want to get a readable barcode text, the optimization as des-
cribed above is recommended.

B.8 Barcode Vector Graphics

In TEC-IT software you do not only have the possibility to use bitmap images, but also vector
graphics images. Vector graphics have the advantage, that they do not contain any rasterized data,
but only structural information about the barcode (positions and sizes of all bars). Therefore:

All vector graphics can be arbitrarily scaled without gaining any loss of quality.

The file size is usually rather small (it is independent of the barcode dimensions).

However, during printing also vector graphics will eventually be rasterized. Therefore the
module width of the barcode should ideally always be a whole multiple of the dot size of your
printer. If the module width does not fit the printing raster, there will be inaccuracies on the
printout.

As a vector based file format TEC-IT supports the Encapsulated PostScript format (or short eps
format). Considering the advantages as stated above it is usually a good idea to use the eps format
instead of bitmap files wherever possible. However, please note that this format is only supported
by a few applications!

B.9 Code Examples for Barcode Optimization

For your understanding the following examples show the barcode optimization by code. The first
four examples do the optimization by programmatic adaption of the module width. The last sample
shows the usage of the function

BCGetOptimalBitmapSize

.

B.9.1

Linear Barcodes

In this example a linear barcode will be optimized for output. We assume the following specification:

Barcode width = 60 mm
Barcode height = 30 mm

Resolution of the output device = 200 dpi (dots per inch)

Based on this specification we first calculate the projected barcode size in target device pixels. This
size (actually only the width) is then adjusted so that each bar and each space of the barcode
exactly matches the output raster. This is achieved by making sure that the width of one module is a
multiple of one device pixel. A similar height adjustment is not necessary because the scanning
process is usually not affected by the height of the barcode.

Advertising