Error getting tags :
error 404Error getting tags :
error 404 export snapshot | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
export snapshot
Expander triangle

export snapshot [from rect[angle] rectangle] [of object] | [from object] to {file filePath |container} [as format] [with mask maskFile]

Platform Support
MacOS,Mac OS X,Windows,Linux
Creates a picture file from a portion of the screen.

export snapshot to file "Test.ppm"
export snapshot from rect "0,0,200,200" to file "Nav.jpg" as JPEG
export snapshot from Field 1 to file "File1.png" as PNG
export snapshot to pictVariable as GIF

Additional Comments
Expander triangle

Use the export snapshot command to export a screenshot to a file or container.


The rectangle specifies the edges of the rectangle to be exported, separated by commas, in the same order as the rectangle property (left, top, right, bottom).

Important! If a window, stack or object is specified, the rectangle is given in relative (window) coordinates; otherwise, it is given in absolute coordinates.

The filePath specifies the name and location of the file you want to export to. If you specify a name but not a location, the file is created in the defaultFolder.

The container is a reference to a container, usually an image or a URL.

The format is one of the following: paint, JPEG, GIF, or PNG.

The maskFile specifies the name and location of a file to export as an image mask. You can use a maskFile only when exporting in PBM format (paint).

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.


If you use the form export format to..., the selected image is exported.

The export 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 JPEG form exports as a JPEG file, and the export PNG form exports as a PNG file. If you don't specify a format, the file is exported as PBM, PGM, or PPM.

Tip: If the image has an alpha channel, the export PNG form creates a 32-bit PNG file.

If taking a snapshot of an object, the rectangle's coordinates are relative to the top left corner of the card containing the object. The object is rendered into an image as if no other objects existed around it, the snapshot is taken without applying the object's blendlevel or ink. You can take a snapshot of an object regardless of its visibility or open status - in particular, snapshots can be taken of objects that are not on the current card or in stacks that are not open.

If you don't specify a rectangle, Revolution 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.

User Comments
Expander triangle
User thumbnail
Jun 12, 2009
While you can't currently (as of v3.5) use a stack reference with the "from <object>" form, you can export the stack's image using its card, e.g.:
export snapshop from this cd of stack "MyStack" to file tMyFile as PNG