Article View: adobe.postscript.programming
Article #1172Re: DCTEncode filter
From: Miklos Somogyi
Date: Sat, 08 Mar 2003 10:47
Date: Sat, 08 Mar 2003 10:47
24 lines
1834 bytes
1834 bytes
Gernot, Since PS does not have an ARGB filter, you need to write a program (Pascal?) that reads ARGB and spits-out pure-and-simple hex. This "0fe1....ff>" file can be converted to jpeg with the DCT filter and make it ordinary text file with the SCSII85 filter in one go (e.g. by using ghostscript 8.0). The first step is really simple and can be done millions of ways. From the header you need the dimensions, from the trunk you may extract 8-bit bytes for r and g and b for every pixel (forget alpha for the time being). To convert them to hex characters, I would probably use a translation table for speed. At PS level there is a difference between storing the image in "currentfile" and in a string. Until Level3 "currentfile" can be used only once. If you want the same image twice, you have to have two of them... However, there is no size restriction on this type of storage. If you store the image in a string, you may use it as many times you wish, but there is a size restriction (64 kB if I remember well). Many compressed images (less than 1/10 of hex) but few hex images would fit. Miklos
Technical Details
Message-ID:
<1de81742.12@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de81742.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10c61a,f51afc5ab2ff2b54 X-Google-Attributes: gid10c61a,public X-Google-ArrivalTime: 2003-03-08 03:07:45 PST From: "Miklos Somogyi" <som@netlink.com.au> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.postscript.programming Subject: Re: DCTEncode filter Message-ID: <1de81742.12@WebX.la2eafNXanI> Date: Sat, 8 Mar 2003 02:47:55 -0800 References: <1de81742.-1@WebX.la2eafNXanI> Lines: 33 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit