LOADSNAP
Syntax LOADSNAP filename 
LOADSNAP filename.ext
(LOADSNAP)
LOADSNAP type-descriptors
 
Explanation LOADSNAP loads the specified file from the disk into a bit map. Note that the file still exists on the disk; only a copy of it has been transferred to the workspace.The loaded bitmap is invisible. To display it, use PPROP to set its WINDOW property to the name of the Graphics window where it should appear in, like PPROP LOADSNAP "ROSE "WINDOW "Graphics

LOADSNAP can load JPEG format or Windows bitmaps (.BMP) files.The Macintosh version can also load Macintosh PICT files. If no extension is given to the filename, the picture format that is attempted to be loaded is the format specified in the built-in variable PICTURE.FORMAT. If the file has a different extension, then the extension must be specified in the LOADSNAP command.

LOADSNAP reports the image of the graphics file as a bitmap. This result can be used as the input to SNAP or STAMP.

LOADSNAP 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 LOADSNAP "|JPEG=JPEG files,BMP=Windows bitmaps| would, for example, display all files ending with .JPEG 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 available files.

Clicking the Cancel button in a file open/save dialog causes the LOADSNAP command to return an empty list.

See also SNAPSIZE and SAVESNAP.
 

Examples

TopIndex