Declaration: FrmVCA.SaveEndmemberImage (FName, Caption: string; IncludeColorScale: boolean; Width, Height: integer; BgColor: TColor): integer;
Saves the currently displayed endmember image in the file FName. The file extension of FName controls the image format of the the stored file (BMP, PNG and JPG are supported). The parameter Caption contains the text which is written at the upper right corner of the image. The parameter IncludeColorScale controls whether the color scale of the endmember image is included in the image.

The parameters Width and Height determine the width and height of the image (in pixels). Width must be greater than 150, Height must be greater than 80. If either Width of Height is set to zero it is automatically adjusted so that the aspect ratio of the stored image equals the aspect ratio of the endmember image on the screen.

The parameter BgColor determines the background color of the image.

The function returns the following error codes:

 0 ... everything OK
-1 ... invalid width and/or height
-2 ... invalid file format (BMP, PNG, JPG only)
-3 ... cannot save image (disk full or readonly)