Writes the contents of a 2D image field, to a file in raster color postscript format.
module WritePsCore< build_dir="iac_proj/wr_ps", src_file="wr_ps.c", out_src_file="gen.cxx", out_hdr_file="gen.h" > { Image_ARGB+IPort2 &image_in; string+IPort2 file_name; int+OPort2 done; omethod+req FLDtoPS(image_in+read+req, file_name+read+notify+req, done+write+nonotify) = "FLDtoPS"; };
The WritePsCore module takes an image field, and writes an ASCII raster color postscript file suitable for printing. This is different from the vector postscript module (Output VPS) in that it only writes a raster pixel oriented version of the picture to a file, without polygon and line edge information. Using the Output Field module connected to a viewer, an image of any size can be created. This image could be larger than screen resolution if needed.
This module can be more flexible that the Output VPS module as it only deals with the writing of an image to a file. The conversion of the scene or data source into an image is performed by other modules. Hence this module can output a more varied selection of images.
&image_in
Reference to a Image+ARGB input containing the image that should be written to the colour postscript file.
file_name
The name of the file that should be written to. The parameter is of type string. The filename should specify the full path name of the file.
(none)
The low-level WritePsCore module is used in the User Macro writePostscript.
An example application WritePostscriptEg is provided, which loads a geometry file and allows that data to be manipulated and the resultant image to be written to a colour postscript file.
iac_proj/wr_ps/wrpsmods.v contains the WritePsCore module V definitions.
The low-level WritePsMods library containing the module WritePsCore does not specify a process. By default the express process will be used.
The best way to use this module is to output data in both VPS and colour Postscript forms and compare results. The format that that gives the best picture or smallest file size can then be choosen. The results that will be achieved will depend on the contents of your scene.
Ian Curington Advanced Visual Systems, Ltd. Hanworth Lane, Chertsey Surrey, UK KT16 9JX
<a HREF="mailto:ianc@avs.com">ianc@avs.com</a>
International AVS Centre Manchester Visualization Centre Manchester Computing University of Manchester Oxford Road Manchester United Kingdom M13 9PL
writePostscript, WritePsUI, WritePostscriptEg, Output VPS, Output Field, Write Image