Thread View: adobe.postscript.programming
2 messages
2 total messages
Started by John Stewart
Fri, 26 Mar 2004 18:30
image data source
Author: John Stewart
Date: Fri, 26 Mar 2004 18:30
Date: Fri, 26 Mar 2004 18:30
37 lines
2959 bytes
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.
Re: image data source
Author: 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. > >
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads