SAVEPIC
Syntax SAVEPIC filename 
SAVEPIC filename.ext 
(SAVEPIC)
(SAVEPIC filename.ext windowname)

SAVEPIC []
SAVEPIC type-descriptors
 
Explanation SAVEPIC saves drawings in the graphics window directly to the disk. SAVEPIC saves graphics images in the format specified in the built-in variable PICTURE.FORMAT. If you want the file to be saved in a different graphics format, add the appropriate extension to the filename when you use SAVEPIC. Valid file formats are BMP (Windows bitmap), JPG, and PICT for the Macintosh version.

Picture files can be viewed with LOADPIC in Logo or in any other application that uses standard graphics formats.

SAVEPIC is also capable of displaying a standard file open/save dialog box. In order to open a dialog box instead of a file, the file name contains a list of file type descriptors. A file type descriptor is a file type, optionally followed by an "=" and a description. The text "JPG=JPEG files" would be a vaild file type descriptor for all files ending with ".JPG". More than one file descriptor may be supplied; in this case, separate the descriptors with commas. The file open/save dialog would display all files ending with the given file type. A Windows dialog would also display the description of the file types, while a Macintosh dialog would display the matching files only. The Logo command SAVEPIC "|JPG=JPEG files,BMP=Windows bitmaps| would, for example, display all files ending with .JPG or .BMP.

If you use "*" as a file type, the file open/save dialog displays all available files. This is done differently on Windows and the Macintosh. A Windows dialog would initially display all files with the first type, and offer all additional file types as choices. The Macintosh dialog would always display all files matching all file types.

If you do not supply a file name, Logo automatically opens a file open/save dialog displaying all graphics images.

The name of the Graphics window to save may be supplied as an optional, second input. If this input is omitted, the contents of the current Graphics window are saved.

Clicking the Cancel button in a file open/save dialog cancels the execution of the SAVEPIC command.

See also SAVE and LOAD.

Examples

(The saved image, PRETTY.BMP, looks like this:)

TopIndex