Oh, the problem is that you need to pass "gif", not "image/gif", for
the format. Weird that javax.imageio doesn't throw an exception.
But it looks like there is a smaller problem with the code, it
generates barcodes that are inverted -- white on black. I can fix
that.