On Tuesday 01 July 2003 17:12,Mike Thorn wrote:
> I'm a little unfamiliar with PostScript, being new to Linux and
> all. Can you tell me what that is and how your postscript file
> interacts with GIMP?

For a short answer:
a Postscript file is a file in the Programing language called 
postscript, that is human readable if open in a text editor, and 
which is executed and generates a drwaing, when open in an apropriate 
appllication. The GIMP can open Postscript files as drawings.

This script I made is one that renders an hexagon grid.

I also have a GIMP plugin taht can save gimp Paths in postscript files 
that can be open in other such applications.


"In long:"

Postscript is a page description language, first devised, almost 30 
yeras ago, to be used to print pages.

The idea is that the printers themselves should have a way to 
interpret a postscript program, and the program do generate one or 
more pages taht are to be viewed.

Well, what happens is that a pritner able to proccess a postscript 
file does have to have not only a computer, but a lot of memory 
built-in. So, in most Unixes, there is a postscript interpreter taht 
functions as a printer driver, among other things.

All your GUI programs generate postscript files when they are 
printing. These files are run automatically through the  postscript 
interpreter (unless you do have a postscript enabled printer), which 
them sends printer data to the printer.

This postscript interprter built in Unix and Linux in particular is 
the Ghostscript program. It's far more versatile than just a printer 
driver. With a couple of simple commands in postscript one can make 
beautiful vector drawings - and ghostscript allows saving them to a 
lot of other picture formats.

The GIMP uses the Ghostscript program as a utility to open postscript 
files as drawings transparently. So, a little program made in 
postscript to generate a drawing, like an Hex Grid, can be open as if 
it were a picture.

One of the advantages of it over a simple GIF or PNG with an hex grid, 
is taht a postscript file is human readable (unless generated by a 
program which deliberately obsfuscates it, like the Windows(tm) 
postscript drivers or CorelDraw).

In particular, in this hex grid script I made, one can change the 
number of hexes and their size, just by modifing three decimal 
numbers on the last line of the file, with any text editor.



Gimp-user mailing list

Reply via email to