Article View: adobe.postscript.programming
Article #1241DCTEncode filter
From: Miklos Somogyi
Date: Sat, 01 Mar 2003 15:56
Date: Sat, 01 Mar 2003 15:56
78 lines
2103 bytes
2103 bytes
Gents,
I have a new level-3 DPS viewer and I thought
that I will use it to convert big asciihex
screendumps to dct and ascii85 form to save
a lot of disk space.
I got into the Bible to learn 'bout filters
and came up with the following test program:
----------
%!
/W 95 def % width & height
/H 85 def
/st 36 string def
/dfile (hello) (w) file def % disk file
/ofile dfile << /Columns W % filtered outfile
/Rows H
/Colors 3 >>
/DCTEncode filter
/ASCII85Encode filter def
/ifile currentfile % filtered infile
/ASCIIHexDecode filter def
/proc { { ifile st readstring % binary string
{ ofile exch writestring }
{ ofile exch writestring
ofile closefile exit } ifelse
} loop
} def
proc
8e474c8e3745943041993646a03d4... 72 characters
:
12160605030100000000000010130...>
showpage
----------
If I omit the "<<...>> /DCTEncode filter" stuff, I get
perfect ascii85 data for the image operator.
With "<<...>> /DCTEncode filter" however, I expected
to get a small compressed printable ascii file.
I got a file that is
small
binary
with a jpeg header (the image viewers recognises it)
with premature end
what is dispalyed is not correct
I also got a lot of rubbish on the stack.
I would be grateful for any pointer re what is wrong?
Miklos
Technical Details
Message-ID:
<1de81742.-1@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!newsfeed.telusplanet.net!xmission!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebXShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10c61a,f51afc5ab2ff2b54,start X-Google-Attributes: gid10c61a,public X-Google-ArrivalTime: 2003-03-01 08:08:09 PST From: "Miklos Somogyi" <som@netlink.com.au> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!newsfeed.telusplanet.net!xmission!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.postscript.programming Subject: DCTEncode filter Message-ID: <1de81742.-1@WebX.la2eafNXanI> Date: Sat, 1 Mar 2003 07:56:12 -0800 Lines: 78 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit