TIFF and LibTiff Mail List Archive


1999.08.18 20:10 "What's wrong with this TIFF?", by Kevin D. Quitt
1999.08.19 13:02 "Re: What's wrong with this TIFF?", by Helge Blischke
1999.08.20 16:30 "Re: What's wrong with this TIFF?", by Alberto Accomazzi
1999.08.20 16:31 "[Fwd: Re: What's wrong with this TIFF?]", by Helge Blischke

1999.08.20 16:30 "Re: What's wrong with this TIFF?", by Alberto Accomazzi

PostScript allows the direct inclusion of the binary CCITT Group IV data from a TIFF file. My program reads in a TIFF, converting it from multiple strips to a single strip, as necessary, and puts a PostScript wrapper around it. Generally things have worked well, but with certain images I'm getting a PostScript error in the middle of the TIFF data. The image was created in PaintShop Pro, then run through tiffcp to convert it to a single strip.

This is a bit off the point of the original poster, but since this question has been bugging me for a while, here it goes:

is there any way to create a level 2 postscript (or PDF) file which contain the sequence of encoded strips (with proper postscript code wrappers between them) rather than having to decode and re-encode the data as a single strip? All the tests that I've attempted seem to indicate that the answer is no, but I fail to understand why.

What I was trying to do is create a postscript file that does the following (all TIFFs are planar configuration, multi-strip G4 files):

  nstrips {
    ncols rowsperstrip g4image
    0 offset translate
  } repeat
[ all data, encoded as ASCII85 G4 stream ]

nstrips = number of strips in the TIFF file,
ncols = image width
g4image = procedure that renderes g4-encoded data stream
offset = height of rendered image strip on the page

This doesn't seem to work reliably for all TIFFs (at least with the code that I wrote). Isn't it the case that a G4 TIFF strip is fundamentally equivalent to a G4 image and therefore I should be able to use the same Postscript code to render it?

Does any TIFF/postscript/PDF guru have any insight?

-- Alberto

Editor's note: This mail was not originally archived, and has been reconstructed from quotes.