IMAGEEXTRACT

Extracts a rectangular region of a graphic file and writes the portion of the graphic to a new file.

Syntax:

IMAGEEXTRACT source$, destination$, startx, starty, width, height

Discussion:

This keyword opens the source graphic, and extracts a rectangular portion of the file, then writes the extracted portion to the destination file. The files may be in BMP, JPG or PNG format. Conversion between the formats is automatic and is based upon the extension provided. The startx and starty values are the offsets from the left side and top side respectively, in pixels. The top row and left column start at number 1. The width and height values are the size in pixels of the rectangular region to extract.

Example:

S$ = "C:\TEMP\SOURCE.JPG"
D$ = "C:\TEMP\DESTINATION.JPG"
IMAGEEXTRACT S$, D$, 1, 1, 20, 20
 

Related Functions:

PIXX, PIXY

Related Keywords:

IMAGECOMBINE

Next: