SaveSnapshot -- take a snapshot (V2.0)
SaveSnapshot(f$[, mode, fmt, table])
This function takes a snapshot and saves it as the file specified in f$. The mode argument specifies the area to be grabbed. This can be one of the following constants:

Grabs the complete Hollywood display, i.e. with window decorations. This is the default.

Grabs the display's contents only, i.e. without window decorations.

Grabs the complete host screen.

Note that if the display is a palette mode display and you want the image file to be palette-based as well, you need to use #SNAPDISPLAY as this is the only snap mode that doesn't contain any other graphics besides the display's contents.

The fmt argument specifies the desired output image format. This can either be one of the following constants or an image saver provided by a plugin:

Windows bitmap. Hollywood's BMP saver supports RGB and palette images. #IMGFMT_BMP is the default format used by SaveSnapshot().

PNG format. Hollywood's PNG saver supports RGB and palette images. RGB images also can have an alpha channel, palette images can have a transparent pen. (V2.5)

JPEG format. Note that the JPEG format does not support alpha channels or palette-based graphics. The Quality field (see below) allows you to specify the quality level for the JPEG image (valid values are 0 to 100 where 100 is the best quality). (V4.0)

GIF format. Because GIF images are always palette-based, RGB graphics have to be quantized before they can be exported as GIF. You can use the Colors and Dither tags (see below) to specify the number of palette entries to allocate for the image and whether or not dithering shall be applied. When using #IMGFMT_GIF with a palette display, no quantizing will be done. #IMGFMT_GIF also supports palette images with a transparent pen. (V4.5)

IFF ILBM format. Hollywood's IFF ILBM saver supports RGB and palette images. Palette images can also have a transparent pen, alpha channels are unsupported for this output format. (V4.5)

The optional table argument allows you to configure further parameters:

Set to True to enable dithering. This tag is only handled when the destination format is palette-based and the source data is RGB. Defaults to False which means no dithering.

Specifies the desired image depth. This is only handled when the format is palette-based and the source data is RGB. Valid values are between 1 (= 2 colors) and 8 (= 256 colors). Defaults to 8. (V9.0)

This is an alternative to the Depth tag. Instead of a bit depth, you can pass how many colors the image shall use here. Again, this is only handled for palette-based formats when the source data is RGB. Valid values are between 1 and 256. Defaults to 256.

Here you can specify a value between 0 and 100 indicating the compression quality for lossy compression formats. A value of 100 means best quality, 0 means worst quality. This is only available for image formats that support lossy compression. Defaults to 90 which means pretty good quality.

This tag allows you to specify one or more file adapters that should be asked if they want to save the specified file. If you use this tag, you must set it to a string containing the name(s) of one or more adapter(s). Defaults to the adapter set using SetDefaultAdapter(). See Loaders and adapters for details. (V10.0)

This tag can be used to specify additional data that should be passed to loaders and adapters. If you use this tag, you must set it to a table of key-value pairs that contain the additional data that should be passed to plugins. See User tags for details. (V10.0)

Here is an overview that shows which formats support which tags:

destination file
optional: specifies which area shall be grabbed (defaults to #SNAPWINDOW)
optional: output format; either #IMGFMT_BMP, #IMGFMT_PNG, (V2.5) #IMGFMT_JPEG, #IMGFMT_GIF or #IMGFMT_ILBM (V4.0) (defaults to #IMGFMT_BMP)
optional: table argument for configuring further options (V4.5)
Saves a snapshot of the Hollywood window to "Snap.bmp".

Show TOC