Camera Block



Capture Photo

The Camera Block allows you to display the camera input in a block and take a photo.

It is useful for Selfie and show photos in a specific area of the screen.

If you don't need a specific area and or preview you can also use the Take Photo Action.


You can set the block to use front or back camera.


Example of use where a mask is applied on top of the Camera Block for a rounded effect




Install the Camera Block Demo App


The path to the captured image is stored in the Image Path Variable.



Adjust Photo Quality

When Limit to Block Size is checked, the saved image's dimensions will be the number of device-independent pixels, or points, of the Camera Block, times the screen's density up to the selected Maximum Density.

When Limit to Block Size is checked, the saved image's dimensions will be the number of device-independent pixels, or points, of the Camera Block, times the screen's density up to the selected Maximum Density.


Take Photo is done by tapping on the Block itself.


Events

2 Events are available:



You can use Photo Captured to show the photo taken.

Associate a layer with an image block in it as shown herein


Show Photo

Use an image block with the variable defined under 'Image Variable Path' above to access the file.



Convert to Base64

To convert a file (photo) into a Base64 format you need to install the File Utilities Plugin.

That plugin will install a 'Convert to Base64' Action.



Save Photo 

Once you have captured an image you can:

- Save that photo on your device

- Save that photo in a  REST service (like Cloud Collection).


Convert Photo into a B64 format