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) → integerParameters
| Name | Type |
|---|---|
| cameraID | integer |
| imageID | integer |
Every form returns
integer
Example · generated
camera = CreateTweenCamera(1.0)image = LoadImage("assets/sprite.png", 1)DO Print(DeviceCameraToImage(camera, image)) Sync()LOOPCreateTweenCamera 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.