next up previous contents
Next: SIZEIMAGE Set Size of Up: Image Display Functions Previous: POINT Image Point Information   Contents

Subsections

PRINTIMAGE Print an Image To A File

Usage

This function ``prints'' the currently active image to a file. The generic syntax for its use is

  printimage(filename)

or, alternately,

  printimage filename

where filename is the (string) filename of the destined file. The current image is then saved to the output file using a format that is determined by the extension of the filename. The exact output formats may vary on different platforms, but generally speaking, the following extensions should be supported cross-platform:

Note that only the image is printed, not the window displaying the image. If you want something like that (essentially a window-capture) use a seperate utility or your operating system's built in screen capture ability.

Example

Here is a simple example of how the figures in this manual are generated.

--> x = linspace(-1,1,512)'*ones(1,512);
--> y = x';
--> Z = exp(-(x.^2+y.^2)/0.3);
--> image(Z);
--> printimage printimage1.eps
--> printimage printimage1.jpg

which creates two images printimage1.eps, which is an Encapsulated Postscript file, and printimage1.jpg which is a JPEG file.

7029


next up previous contents
Next: SIZEIMAGE Set Size of Up: Image Display Functions Previous: POINT Image Point Information   Contents
2004-08-26