
code128 barwidth string [> output-file]
Code128 generates barcode images in JPG (or GIF, if you don’t
have a copy of libjpeg on your system) using
Boutell.com’s
GD graphics library. It takes
two arguments — the width of the smallest bar in the output (typically
1; the title image on this page uses 2) in pixels, and the string you wish
to generate a barcode of. It encodes that string using the Code 128
barcode format, and dumps the resulting image to standard out.
If your system has a new version of GD and the
IJG’s libjpeg, code128
produces a jpeg image, otherwise it produces a GIF image.
barwidth long per character,
plus 35 barwidth for the message envelope.Code128 uses my configuration
system to configure itself for building on various platforms. To
build the code, untar the archive, run configure.sh, then run
a make.