🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.postscript.programming
Article #654

image data source

#654
From: John Stewart
Date: Fri, 26 Mar 2004 18:30
37 lines
2959 bytes
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: <eF_8c.44596$Oo5.41524@twister.nyroc.rr.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!newshosting.com!nx02.iad01.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!news.maxwell.syr.edu!news-rtr.nyroc.rr.com!news-out.nyroc.rr.com!twister.nyroc.rr.com.POSTED!53ab2750!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10c61a,ea4b93dd4084d07b,start
X-Google-Attributes: gid10c61a,public
X-Google-ArrivalTime: 2004-03-26 10:30:46 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!newshosting.com!nx02.iad01.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!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
Subject: image data source
Lines: 39
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: <eF_8c.44596$Oo5.41524@twister.nyroc.rr.com>
Date: Fri, 26 Mar 2004 18:30:34 GMT
NNTP-Posting-Host: 24.97.196.225
X-Complaints-To: abuse@rr.com
X-Trace: twister.nyroc.rr.com 1080325834 24.97.196.225 (Fri, 26 Mar 2004 13:30:34 EST)
NNTP-Posting-Date: Fri, 26 Mar 2004 13:30:34 EST
Organization: Road Runner