SaveSnapshot(f$[, mode, fmt, table])
f$
. The mode
argument specifies the area to be grabbed. This can
be one of the following constants:
#SNAPWINDOW:
#SNAPDISPLAY:
#SNAPDESKTOP:
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:
#IMGFMT_BMP:
#IMGFMT_BMP
is the default format used by SaveSnapshot()
.
#IMGFMT_PNG:
#IMGFMT_JPEG:
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)
#IMGFMT_GIF:
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)
#IMGFMT_ILBM:
The optional table argument allows you to configure further parameters:
Dither:
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.
Depth:
Colors:
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.
Quality:
Adapter:
UserTags:
Here is an overview that shows which formats support which tags:
#SNAPWINDOW
)#IMGFMT_BMP
, #IMGFMT_PNG
, (V2.5)
#IMGFMT_JPEG
, #IMGFMT_GIF
or #IMGFMT_ILBM
(V4.0) (defaults to #IMGFMT_BMP
)SaveSnapshot("Snap.bmp")Saves a snapshot of the Hollywood window to "Snap.bmp".