13.8: Image extractor
When Gri draws an image with `draw image ', it embeds special
comments in the PostScript to allow removal of the data by an extractor
program; for details see Image PostScript Output. The extractor
program is included along with the source distribution, in the C file
called `gri_extract_image.c '. After compiling it manually (since
there is no Makefile for it), use it as a filter, e.g.
gri_extract_image < file.ps > file.pgm
|
The result is an image in the pgm format. ("pgm" stands for portable
graymap; see unix manpage on `pgm '.) Standard converters are
available to convert pgm into most other formats.
Note that just the image is output, not the axes or any other part of
your drawing. If you want to make your entire page into an image
(perhaps for incorporation into a web-page), try using the FSF `gs '
program. For example, if the PostScript filename is `foo.ps', do
this:
$ gs foo.ps
GS> (pstoppm.ps)run
GS> (foo) ppm1run
GS> quit
|
|