Syntax 1: For InkPicture controls
Description
Saves a picture and optionally overlay ink to a file or blob from
an InkPicture control.
Applies to
InkPicture controls
Syntax
|
1 |
inkpicname.Save( t | b , format { , WithInk } ) |
|
Argument |
Description |
|---|---|
|
inkpicname |
The name of the InkPicture control from which you want |
|
t |
A string containing the name and location of the file |
|
b |
The name of a blob passed by reference that will hold |
|
format |
An integer specifying the format in which the picture is 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 True — overlay ink is saved with the picture False — overlay ink is not saved with the |
Return value
Integer. Returns 1 for success and -1 for failure.
Usage
Use the Save function to save the image in an InkPicture control
to a file or blob 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 and
its ink annotations in bitmap format into a blob, and attempts to update
the image in the database:
|
1 2 3 4 5 6 7 8 9 10 |
int li_return blob lblb_ink li_return = ip_1.save(lblb_ink, 0, true) UPDATEBLOB employee SET backimage = :lbb_ink WHERE emp_id = :gi_id; IF sqlca.SQLNRows > 0 THEN COMMIT; ELSE messagebox("Update failed",sqlca.sqlerrtext) END IF |
The following example saves the image in an InkControl into a GIF
file without any ink annotations:
|
1 2 3 4 5 |
int li_return string ls_pathname, ls_filename GetFileSaveName("Save As", ls_pathname, ls_filename, "GIF") li_return = ip_1.save(ls_pathname, 2, false) |
See also