export snapshot | ||||||||||||||||||||||||||||
Type | command | |||||||||||||||||||||||||||
Dictionary | LCS | |||||||||||||||||||||||||||
Library | LiveCode Script | |||||||||||||||||||||||||||
Syntax |
| |||||||||||||||||||||||||||
Summary | Creates a picture file from a portion of the screen. | |||||||||||||||||||||||||||
Introduced | 2.1 | |||||||||||||||||||||||||||
Changes | The | |||||||||||||||||||||||||||
OS | mac, windows, linux, ios, android | |||||||||||||||||||||||||||
Platforms | desktop, mobile | |||||||||||||||||||||||||||
Parameters |
| |||||||||||||||||||||||||||
Example |
| |||||||||||||||||||||||||||
Related | Keyword: file, image Property: cursor, defaultFolder, rectangle, windowID Command: export, import snapshot, select Function: screenRect Glossary: PPM, command, container, PBM, alpha channel, object reference | |||||||||||||||||||||||||||
Security | privacy | |||||||||||||||||||||||||||
Description | Use the export snapshot command to export a screenshot to a file or container. If you use the form export format to..., the selected image is exported. The export snapshot ... as paint form exports the image as a PBM, PGM, or PPM file, depending on the screen depth. (Optionally, you can specify a location for the mask file.) The export snapshot ... as JPEG form exports as a JPEG file, and the export snapshot ... as PNG form exports as a PNG file. If you do not specify a format, the file is exported as PBM, PGM, or PPM. Using 'with' or 'without effects' specifies whether graphic effects and a blendLevel should be applied to the object before rendering export. iOS supports both the object and screen snapshot variants of the export snapshot command. In the screen snapshot case, coordinates are given relative to the top-left of the screen and include the status bar.
If you don't specify a rectangle, LiveCode displays a crosshairs cursor. Click at one corner of the rectangle to be imported and drag to the opposite corner to select the area. If you specify a windowID, the rectangle's coordinates are relative to the top left corner of the window you specify. However, if the window is partly overlapped by another window, whatever is visible on the screen within that rectangle is placed in the snapshot. In other words, you cannot take a snapshot of a part of a window that is hidden by another overlapping window. Use the at size extensions if you wish the engine to resize the snapshot taken to the dimensions specified. To export a snapshot for a portion of a stack you use the form: export snapshot from rect[angle] of window windowID to ... Where windowId is the windowId property of the required stack. To export a snapshot of a specific (non-stack) object, use the form: export snapshot from [rect[angle]] of 'chunk' to ... Where 'chunk' is any chunk expression resolving to a control, or any expression evaluating to a control reference. To export a snapshot of an object in iOS use the form:
To export a snapshot of the screen in iOS use the form:
| |||||||||||||||||||||||||||
Tags | file system,multimedia |