On Tue, 2002-11-05 at 09:39, Carl Cerecke wrote:
> Mark Carey wrote:
> > Hi,
> > Am having a play with post script, I have the Adobe language
> > specification (912 pages), problem is when I open a post script file the
> > text is not in a human readable form
Does the first line mutter something along the lines of
        %!PS-Adobe-3.0
or
        %!PS-Adobe-2.0
IF it does then you are looking at a PS file.  Alternatively you may be
looking at a PDF, which will start with
        %PDF-1.3
or something similar, or, as Carl said, you may be looking at a gzipped
PS file.  If the latter is the case (run "file foo.ps" to figure out if
it is gzipped) you can uncompress the file using "gunzip foo.ps"

> Embedded images are inserted in some sort of uuencoded/base64
> type format. You've got the specs.
So have I.  For the curious, PS images are a sequence of "8-bit integers
in the range of 0 to 255" (characters in other words) or a bitmap
(represented as characters).  In version 1 of PostScript there was no
way of specifying colour, however you are probably looking at a file
that uses version 2 or later, which represents colours as sequences of
characters using CMYK, RGB, or a myriad of other forms.  Each character
represents a part of the colour value; if it is an RGB image, group the
characters into threes, with the first character being the red colour
value, the second green, and the third blue.

>  > I want to actually learn some postscript, I intend to try and write
>  > an interpreter to recover tex source and images from postscript, so I 
>  > am looking at in in xemacs.
XEmacs is a good PostScript editor, I use it myself :)
-- 
Michael JasonSmith      http://www.cosc.canterbury.ac.nz/~mpj17/

Reply via email to