begoyan
begoyan

Reputation: 424

LiveCode: Capture still image from camera on a desktop computer?

How do I capture a still image from camera on a desktop computer using LiveCode?

I'm using this code to capture image on mobile devices:

mobilePickPhoto "front camera" ,100 , 100

Upvotes: 0

Views: 542

Answers (1)

Mark
Mark

Reputation: 2435

First use the video grabber external to set up the camera.

revIinitializeVideoGrabber the short name of this stack,"QT","20,20,120,86"

Now you can grab a frame:

revVideoFrameImage 66,100,myPictureData

and set the imageData of an image control:

set the imageData of img 1 to myPîctureData

and now export it as PNG for instance

export img 1 to myPictureData as PNG

You can write myPictureData to a file.

The revVideoGrabber external may not work with the latest versions of LiveCode.

Upvotes: 1

Related Questions