[xep-support] LZW-compressed TIF files corrupt in PDF output

Nikolai Grigoriev grig at renderx.com
Thu Mar 18 05:25:55 PST 2004


Richard,

> I'm getting skewed images (tiff/LZW) in pdf output 
> (XEP 3.7.4 saved from PhotoShop 7).

This is because of Photoshop's peculiarity in TIFF 
treatment: it appends an extra zero byte to each TIFF
strip _before_ LZW compression. We concatenate
LZW streams without decompression; the extra byte 
introduces a periodic shift and thus makes the image
skewed.

> I know this issue was up on the list a while back 
> but I can't seem to find any further discussion on 
> the topic. Is there a workaround?

The options are as follows:

1. Set strip size for LZW-compressed images to the maximum,
so that the whole image stays in a single strip. (I don't know 
if this is a configurable parameter in Photoshop).

2. Use uncompressed TIFFs. (They will be repackaged
by XEP using Flate compression, and the resulting PDF 
files will be smaller than with LZW-compressed images).

3. Re-save your image using some other TIFF generator.
(These trailing zero bytes in compressed streams are 
a unique feature of Photoshop, not of TIFF format; other 
applications don't necessarily have it).

4. Use PNG instead of TIFF (alas, not applicable if you need 
CMYK images).

5. Wait until end of June, 2004, when Unisys LZW patent expires
in Germany, France, Italy, UK, Japan, and Canada. We will add
proper support for GIFs and TIFFs within days from that date.

Best regards,
Nikolai Grigoriev
RenderX

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo at renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html



More information about the Xep-support mailing list