Table of Contents

Page Camera

ID 1908
Namespace: System.Device

Provides an interface for accessing the camera on the client device.

Examples

Camera.RunModal();
if Camera.HasPicture() then begin
    Camera.GetPicture(InStream);
...
end;
Clear(Camera);

Properties

Name Value
Caption Camera
Editable False
LinksAllowed False
PageType Card
Extensible True
InherentEntitlements X
InherentPermissions X

Methods

IsAvailable

Checks whether the camera on the client device is available.

procedure IsAvailable(): Boolean

Returns

Type Description
Boolean

True if the camera is available, false otherwise.

SetAllowEdit

Indicates whether simple editing is allowed before the picture is stored.

procedure SetAllowEdit(AllowEdit: Boolean)

Parameters

Name Type Description
AllowEdit Boolean

True to enable simple editing, false otherwise.

SetEncodingType

Sets the returned image file's encoding. The default is .

procedure SetEncodingType(EncodingType: Enum "Image Encoding")

Parameters

Name Type Description
EncodingType Enum System.Device."Image Encoding"

The encoding to use when saving the picture.

SetQuality

Sets the quality of the saved image, expressed as a number between 0 and 100, where 100 is the highest available resolution. The default is 50.

procedure SetQuality(Quality: Integer)

Parameters

Name Type Description
Quality Integer

The quality of the picture to be taken.

GetPicture

Gets the picture that was taken when the page was opened. An error is displayed if the function is called without opening the page first.

procedure GetPicture(var TempBlob: Codeunit "Temp Blob")

Parameters

Name Type Description
TempBlob Codeunit System.Utilities."Temp Blob"

The object to put the picture BLOB in.

HasPicture

Checks if the picture is available and can be obtained with a method.

procedure HasPicture(): Boolean

Returns

Type Description
Boolean

True if the picture is available, false otherwise.

Remarks

The picture will not be available if the page was not opened (e. g. Camera.RunModal() function was not called) or if the dialog was canceled.

GetPicture

Gets the picture that was taken when the page was opened. An error is displayed if the function is called without opening the page first.

procedure GetPicture(InStream: InStream)

Parameters

Name Type Description
InStream InStream

The InStream to read the picture from.

See also