Article View: adobe.postscript.programming
Article #655Re: image data source
From: John Stewart
Date: Fri, 26 Mar 2004 19:24
Date: Fri, 26 Mar 2004 19:24
54 lines
3336 bytes
3336 bytes
I just found comp.lang.postscript which seems like it might be a better group to post this on. So I've posted it there as well. John. "John Stewart" <john.stewart@_RE_MOVE_tentechnologies.com> wrote in message news:eF_8c.44596$Oo5.41524@twister.nyroc.rr.com... > I'm using the image operator with a dictionary to render TIFF files resident > on disk. For /DataSource I use a file (created by opening the TIFF file and > setting the file position to the start of the data) and the appropriate > filter based on the TIFF compression type. This is all working great. > > I'm now working on a striped TIFF file where the data is saved as multiple > strips in the TIFF file. It's easily processed by reading the TIFF header > to determine the number of strips, bytes per strip and the strip offsets. > > My problem is that I need to modify my /DataSource from a single filtered > file to a procedure that processes all of the strips of data. My current > /DataSource looks something like this for an LZW file where f1 is the input > TIFF file with it's file position set to start of the data: > > /DataSource f1 /LZWDecode filter > > So for my striped file all I get from this is the first strip of data > rendered (the strip appears to have an EOD at the end so everything buttons > up nicely). I can see how to render the whole image by calling image once > for each strip and translating between each call. But it seems like I > should also be able to modify my /DataSource to return all (n) strips of the > file. This has the advantage that my supporting code would be no different > regardless of the type of file processed. > > And this is where I lose it. I'm having trouble understanding the Data > Source construction enough to write a procedure which will do this. All I > need to do is, for each strip, <f1 StripOffset setfileposition f1 > /LZWDecode filter> and repeat for each strip. But I can't figure out how to > do this as part of the /DataSource of the image dictionary. > > Does anybody have an examples of a /DataSource that does anything like this > or have any comments about my problem? > > Thanks in advance for any input. > > John Stewart > Ten Technologies. > >
Technical Details
Message-ID:
<Vr%8c.90467$KB.32269@twister.nyroc.rr.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!meganewsservers.com!feeder2.on.meganewsservers.com!news.maxwell.syr.edu!news-rtr.nyroc.rr.com!news-out.nyroc.rr.com!twister.nyroc.rr.com.POSTED!53ab2750!not-for-mailReferences:
<eF_8c.44596$Oo5.41524@twister.nyroc.rr.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10c61a,ea4b93dd4084d07b X-Google-Attributes: gid10c61a,public X-Google-ArrivalTime: 2004-03-26 11:24:49 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!meganewsservers.com!feeder2.on.meganewsservers.com!news.maxwell.syr.edu!news-rtr.nyroc.rr.com!news-out.nyroc.rr.com!twister.nyroc.rr.com.POSTED!53ab2750!not-for-mail From: "John Stewart" <john.stewart@_RE_MOVE_tentechnologies.com> Newsgroups: adobe.postscript.programming References: <eF_8c.44596$Oo5.41524@twister.nyroc.rr.com> Subject: Re: image data source Lines: 56 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Message-ID: <Vr%8c.90467$KB.32269@twister.nyroc.rr.com> Date: Fri, 26 Mar 2004 19:24:37 GMT NNTP-Posting-Host: 24.97.196.225 X-Complaints-To: abuse@rr.com X-Trace: twister.nyroc.rr.com 1080329077 24.97.196.225 (Fri, 26 Mar 2004 14:24:37 EST) NNTP-Posting-Date: Fri, 26 Mar 2004 14:24:37 EST Organization: Road Runner