GrabImage()

Syntax

Result = GrabImage(#Image1, #Image2, x, y, Width, Height)
Description
Create a new image with the selected area on the source image.

Parameters

#Image1 The source image.
#Image2 A number to identify the new image. #PB_Any can be specified to auto-generate this number.

Note: The number of an existing image created using #PB_Any can not be used as the target image. Instead, the existing image must be freed and a new number generated by passing #PB_Any here.
x, y, Width, Height The location and size of the area to copy into the new image.

Return value

Returns nonzero if the image was created successfully and zero if the image could not be created. If #PB_Any was specified as the #Image2 parameter then the auto-generated number is returned on success.

See Also

CreateImage(), LoadImage(), CopyImage()

Supported OS

All

<- FreeImage() - Image Index - ImageDepth() ->