We have a requirement to produce color TIFF documents with Lsb2Msb fill order. Unfortunately in GS -dFillOrder work only with B&W tiff output devices. It would be nice to have this parameter work for all tiff output devices since Libtiff fully supports it.
According to TIFF 6 spec: > FillOrder = 2 should be used only when BitsPerSample = 1 and the data is > either uncompressed or compressed using CCITT 1D or 2D compression, to > avoid potentially ambiguous situations. Currently, Ghostscript produces either monochrome 1 bit/pixel TIFF that already honors FillOrder or 8 bit/sample TIFF where this flag is not applicable. Please provide more information about the desired TIFF format or attach a sample TIFF file with the required properties. Perhaps, you just need to generate big endian format (aka 'MM') on a little endian host ?
Alex, you are correct that is what is needed: generating big endian format (aka 'MM') on a little endian host.
Created attachment 4844 [details] Patch to add BigEndian option to TIFF devices Attached please find a patch to add "BigEndian" option to the TIFF devices. Use "-dBigEndian=true" to generate TIFF files with big-endian byte order ("MM"), and "-dBigEndian=false" to generate TIFF files with little-endian byte order ("II"). When this option is not specified, native byte order will be used.
I guess there are TIFF readers that may not be able to handle MM vs. II endian issues, but since we didn't reject this request immediately, I have committed this patch. Thanks (and bounty) to Wendy. Since the MM/II order doesn't change the order of most of the raster data this doesn't really seem like a worthwhile change, but the patch itself demonstrates the correct method of adding parameters to a device, so it is a good example. Change committed as rev 9719.
Changing customer bugs that have been resolved more than a year ago to closed.