Barcode Server: The XBM Image Format

The Barcode Server generate XBM images. What are XBM images? Why?

The Barcode Server generates images in a format known as XBM. While most people who use the web have heard of the GIF and JPG image formats, fewer are aware of XBM. XBM--which is supported by pretty much every graphical web browser in wide use--is a format which represents black-and-while images in a very straightforward format, and has no patent issues. On the other hand, JPG is a complex format for representing full-color (or full-grayscale) images, and it is nearly impossible to repreent a simple black-and-white image (like barcodes) accurately using that format; and GIF is fine for accurately representing images with limited numbers of colors (up to 256, including things like barcodes), but there are patents on the format which prevent someone from providing a service which provides GIF images without fear of reprisal from the patent holders.

A relative newcomer to the image format field is PNG. PNG is intended to be a better and patent-free replacement for GIF, and it looks like it is succeeding at that goal. However, not all commonly-used graphical web browsers support that format yet.

So, out of all the image formats in the universe, XBM is the one that's easiest to output, most suited for the content, most widely deployed, and free of patent problems. That's why the Barcode Server generates XBMs.

I can't seem to use an XBM image except in my web browser. Can you help?

First of all, note that I primarily use Linux, so I can't specifically address issues you might have using Windows or MacOS.

Some systems won't recognize a format unless you provide a proper extension on the end of a file name. If you save a barcode image, make sure the name ends with ".xbm".

While most graphical web browsers understand XBM, surprisingly fewer image manipulation programs do. If you can't get your image editor (e.g., Photoshop) to load an XBM, then, as a last resort, there is probably a way for you to capture a screenshot that includes your web browser showing the image you care about, and being built-in to your system, the format of that screenshot will almost certainly be understandable by other applications you use. Take the screenshot and edit out everything but the barcode image, and you'll be set.

Note that there are two freely-distributable image manipulation tools that definitely do understand XBM: The GIMP and ImageMagick. Follow those links to downloads and documentation for each of them.

I hope this helps.


The Barcode Server
Copyright © 1994-2001 Dan Bornstein. All rights reserved.