DeviceCameraToImage

Family: Image · One form

What it does

DeviceCameraToImage writes to an Image object: it sets rather than reads. It takes cameraID (an integer) and imageID (an integer), and answers an integer. cameraID is the id of a Camera object, obtained elsewhere in the Image family.

Syntax

DeviceCameraToImage(cameraID integer, imageID integer) → integer

Parameters

NameType
cameraIDinteger
imageIDinteger

Every form returns

integer

Example · generated

camera = CreateTweenCamera(1.0)image = LoadImage("assets/sprite.png", 1)DO  Print(DeviceCameraToImage(camera, image))  Sync()LOOP

CreateTweenCamera and LoadImage are there to give the call something to act on; DeviceCameraToImage is the line that matters. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.

35 commands in Image