Difference between revisions of "Camera"
From GiderosMobile
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | '''<translate>Supported platforms</translate>:''' [[File:Platform android]][[File:Platform ios]][[File:Platform mac]][[File:Platform pc]]<br/> | + | '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/> |
'''<translate>Available since</translate>:''' Gideros 2017.8<br/> | '''<translate>Available since</translate>:''' Gideros 2017.8<br/> | ||
=== <translate>Description</translate> === | === <translate>Description</translate> === |
Revision as of 09:36, 24 August 2018
Supported platforms:
Available since: Gideros 2017.8
Description
Renders live camera stream into a Texture
Examples
Example
require "camera"
-- Probe camera size (use a dummy 512x512 surface)
Camera.texture=Texture.new(nil,512,512)
cw,ch=Camera.start(Camera.texture)
Camera.stop()
-- Restart camera with a full sized texture
Camera.texture=Texture.new(nil,cw,ch,true)
cw,ch=Camera.start(Camera.texture)
application:setLogicalDimensions(ch,cw)
local b=Bitmap.new(Camera.texture)
stage:addChild(b)
Methodscamera.availableDevices Return a list of available devices. |
EventsConstants |