SaveInkPic

Description

Saves a picture and optionally overlay ink to a file from an InkPicture control.

Applies to

DataWindow type

Method applies to

PowerBuilder

DataWindow control


Syntax

PowerBuilder

integer dwcontrol.SaveInkPic ( string name, long rownumber, string filename , integer format  {, boolean withink } )

Argument

Description

dwcontrol

A reference to a DataWindow control.

name

The name of the InkPicture control from which you want to save the picture.

rownumber

The number of the row that contains the picture to be saved.

filename

A string containing the name and location of a file that will hold the picture in the control.

format

An integer specifying the format in which the picture is to be saved. Values are:

0 -- BMP (bitmap)

1 -- JPEG (Joint Photographic Experts Group)

2 -- GIF (Graphics Interchange Format)

3 -- TIFF (Tagged Image File Format)

4 -- PNG (Portable Network Graphics)

withink (optional)

A boolean specifying whether overlay ink should be saved with the picture. Values are:

True -- overlay ink is saved with the picture (default)

False -- overlay ink is not saved with the picture


Return value

Integer.

Returns 1 for success and -1 for failure.

Usage

Use the SavInkPic method to save the image in an InkPicture control in a DataWindow to a file with or without any ink annotations that have been made to it. By default, the ink is saved with the image.

Examples

The following example saves the image in an InkPicture control in row 3 of a DataWindow object into a GIF file without any ink annotations:

int li_return
string ls_pathname, ls_filename
GetFileSaveName("Save As", ls_pathname, & 
   ls_filename, "GIF")
li_return = dw_1.SaveInk(inkpic_1, 3, & 
   ls_pathname, 2, false)

See also

ResetInk

SaveInkPic