AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2006.06.23 04:45 "[Tiff] TIFF JBIG", by Charles Auer
2006.06.23 09:52 "Re: [Tiff] TIFF JBIG", by Joris
2006.06.23 15:38 "Re: [Tiff] TIFF JBIG", by Charles Auer

2006.06.23 04:45 "[Tiff] TIFF JBIG", by Charles Auer

Well, I finally made my way to the LibTIFF CVS, and I was happy to find a new file, tif_jbig.c. I couldn't wait to take it home and take it out for a spin, so to say, and in no time at all, I was reading and writing TIFF JBIG's.

While I applaud the work that Lee Howard has done in bringing JBIG to LibTIFF, there are some major limitations with tif_jbig.c:

  1. Images can contain only one strip.
  2. Tiles are not supported.
  3. It appears that only one bit plane is supported.

The first 2 limitations don't bother me, they are relatively easy upgrades. I'm more concerned that there might not be enough general interest for anyone, myself included, to work on incorporating JBIG with multiple bit planes.

I realize that JBIG, by definition, deals with bi-level images and is mostly used for faxes, but JBIG's with multiple bit planes can be easily constructed, allowing grayscale and color images to be compressed. The code for reading and writing multiple plane JBIG's is nicely illustrated in the files jbgtopbm.c and pbmtojbg.c, which are included in Markus Kuhn's JBIG-KIT library.

Of course, the problem with stand-alone, multi-plane JBIG files has always been that there is no standardized way to encode information such as the meaning of the various bit planes, causing the compression of color images to be plagued with ambiguity. However, this ambiguity disappears when we incorporate JBIG into TIFF, thanks to basic tags such as photometric interpretation, bits per sample, and samples per pixel. In a manner of speaking, multi-plane JBIG compression finds a happy home inside TIFF files.

One might envision a scheme where every strip or tile of a grayscale or color image is a n-plane JBIG image, where n is the number of bits per pixel (PLANARCONFIG_CONTIG) or n is the number of bits per sample (PLANARCONFIG_SEPARATE).

Charles

--------------------------------------------------------

On a different subject now, I was also eager to try out the completely rewritten tif_ojpeg.c file. It's a masterpiece, although I did think that the warning handler message was a little wordy. My entire collection of OJPEG images displayed beautifully, even the grayscale and multipage ones. Joris is certainly a genius, but I guess we all have suspected that for quite some time. I really enjoyed finally being able to see Zack the Cat with crystal clarity. I wonder if old Zack has passed away since that picture was taken?