neoWebCam
Access the device webcam and take image snapshots.
Sample App:
https://visualneo.com/tutorials/neowebcam
Description
The neoWebcam plugin for VisualNEO Web provides tools for integrating webcam functionality into applications, allowing users to capture images directly from the webcam and save or download them in various formats. This plugin is beneficial for applications requiring image capture for identification, creative projects, or quick snapshots. Here’s a detailed overview of its main features and commands:
Initializing the Webcam
The neoWebcamInit command initializes the webcam within a specified container, allowing users to select the camera device if needed.
- Command: neoWebcamInit
- Syntax: neoWebcamInit "objId" "cameraType"
- objId: The container in which the webcam view will appear.
- cameraType: Specifies the type of camera (leave blank for default or specify options as required).
Example:
neoWebcamInit "webcamContainer" ""
This initializes the webcam within the webcamContainer without specifying a particular camera type.
Capturing Snapshots
The plugin provides commands to capture images from the webcam feed and store them in Base64 format for further use:
- neoWebcamGetJpg: Captures a snapshot and saves it as a JPG in Base64 format.
- Syntax: neoWebcamGetJpg "objId" quality [resultVar]
- quality: JPG quality (0 to 1).
- resultVar: Variable to store the Base64 result.
- neoWebcamGetPng: Captures a snapshot as a PNG in Base64 format.
- Syntax: neoWebcamGetPng "objId" [resultVar]
Example:
neoWebcamGetJpg "webcamContainer" 0.8 "[capturedImage]"
This command captures a JPG image from the webcamContainer with 80% quality and stores it in [capturedImage].
Downloading Captured Images
The plugin also enables direct download of captured images in JPG format:
- neoWebcamDownloadJpg: Takes a snapshot and downloads it as a JPG file.
- Syntax: neoWebcamDownloadJpg "objId" quality "fileName"
- fileName: The name for the downloaded file (e.g., "snapshot.jpg").
Example:
neoWebcamDownloadJpg "webcamContainer" 1 "webcamSnapshot.jpg"
This captures and downloads an image from webcamContainer with maximum quality as "webcamSnapshot.jpg".
Practical Applications
The neoWebcam plugin is ideal for:
- User Identification: Capture and save user photos for authentication.
- Creative Projects: Allow users to take snapshots for interactive projects or editing.
- Documentation: Quick snapshots for applications that require image capture, like inventory tracking or reports.
With simple commands for initializing, capturing, and downloading webcam images, the neoWebcam plugin brings robust image-capture functionality to VisualNEO Web applications.
neoWebcamInit
|
Purpose: |
Initialize the webcam inside a Container. |
|
Category: |
neoWebCam |
|
Syntax: |
neoWebcamInit "objId" "cameraType
objId Select a Container object "cameraType Choose camera" |
neoWebcamGetJpg
|
Purpose: |
Save webcam snapshot as a base64 jpg string |
|
Category: |
neoWebCam |
|
Syntax: |
neoWebcamGetJpg "objId" quality [resultVar]
objId Select Container object quality JPG Quality (0 - 1) resultVar Variable to store result in Base64 format |
neoWebcamGetPng
|
Purpose: |
Save webcam snapshot as a base64 png string |
|
Category: |
neoWebCam |
|
Syntax: |
neoWebcamGetPng "objId" [resultVar]
objId Select Container object resultVar Variable to store result in Base64 format |
neoWebcamDownloadJpg
|
Purpose: |
Takes a webcam snapshot and download it as a jpg image file |
|
Category: |
neoWebCam |
|
Syntax: |
neoWebcamDownloadJpg "objId" quality ""fileName"
objId Select Container object quality JPG Quality (0 - 1) "fileName File name (ie: ""picture.jpg"")" |
Created with the Personal Edition of HelpNDoc: Produce Kindle eBooks easily