AWARE [SYSTEMS]
AWare Systems, , Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
January 2015

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



New Datamatrix section



Valid HTML 4.01!



Thread

2015.01.25 15:44 "How to generate JBIG encoded TIFFs?", by Ludolf Holzheid
2015.01.25 16:34 "Re: How to generate JBIG encoded TIFFs?", by Yuriy Kaminskiy
2015.01.25 17:03 "Re: How to generate JBIG encoded TIFFs?", by Ludolf Holzheid

2015.01.25 16:34 "Re: How to generate JBIG encoded TIFFs?", by Yuriy Kaminskiy

Ludolf Holzheid wrote:
> Hello List,
> 
> I compiled libtiff with JBIG support, but I can't get tiffcp to write
> the output JBIG encoded (and yes, the input is bi-level data).
> 
> If I try to control the conversion with the -t/-s/-r/-l/-w flags, I
> get varying error messages, but in no case tiffcp writes any output
> (see log attached).
> 
> Is this supposed to work?

1) litiff/tif_jbig.c only supports encoding and decoding single-strip JBIG
images (implementation limitation, there are no such limitation in standard);
tiled encoding is also not supported.
2) tif_jbig does not support anything other than 1 bit-per-sample, 1
samples-per-pixel, min-is-black or min-is-white and silently produces garbage
for unsupported bps/spp combinations (also implementation limitation and bug);
3) when changing strip size, tiffcp uses by-scanline conversion, which is not
supported by tif_jbig.

So, you should first convert file to single-strip layout:

tiffcp -r-1 test-in.tiff tmp.tiff

... and then recompress it to jbig:

tiffcp -c jbig tmp.tiff test-out.tiff

I've posted some patches for 2 and 3, but they were ignored so far.