PostScript files can also contain images of very high quality, but they use a very different representation of data than do raster image files. PostScript is actually a language rather than a file format. Images are specified by geometry information (such as a command saying draw a line of a given color from one point on the page to another) rather than by individual pixels. PostScript is the standard language for printers and the best fonts are written in PostScript geometry specifications so that they can be printed at the maximum detail possible. Because of this vast difference in how the files are specified, converting raster image files to and from PostScript files is a complex process and often involves significant image quality degradation. In particular, you will almost always lose something when you convert from PostScript to a raster image format and this is particularly true of text as you lose all of the detailed geometry information which PostScript can store but which raster image files can not use.

The following is a very simple PostScript file for drawing a pyramid. The image shown next to it is what is generated in the middle of an otherwise blank page by executing this PostScript code.

Pyramid
%!
0 setlinewidth
/Times-Roman findfont
12 scalefont setfont
0.0 setgray
0.000 setgray
newpath
0 0 moveto
374 328 moveto
323 332 lineto
240 330 lineto
287 326 lineto
374 328 lineto
306 427 moveto
287 326 lineto
240 330 lineto
306 427 lineto
306 427 moveto
240 330 lineto
323 332 lineto
306 427 lineto
306 427 moveto
323 332 lineto
374 328 lineto
306 427 lineto
306 427 moveto
374 328 lineto
287 326 lineto
306 427 lineto
0 setlinewidth
stroke
showpage

Tools for working with PostScript files

display
Display is part of the ImageMagick suite of tools and can be used to display PostScript files.