Image Manipulation API

'ImageManipulation' external object was designed to help users create and modify images in runtime, by allowing the user to apply different effects and transformations.

e.g.:

nativemobile_ImageEditor

 

Structure

This external object includes the following functions:

Method  
OpenCropTool
nativemobile_api_imagemanipulation_struct
BlackAndWhite
Sepia
GrayScales
Sharpness
CompressPNG
CompressJPG
ImageToBase64
ImageFromBase64
ImageIsSingleColor
RoundCrop
ApplyMask
Combine
NewImage
NewQRCode

 

 

OpenCropTool

Opens a cropping tool that allows the user to define the edges of the image that will be used to crop the image.

The edges of the image are defined by selecting the four corners of the resulting image.

In case of containing a document, or card, the tool will attempt to automatically detect the paper's four corners.

 

BlackAndWhite

Transforms the image to a "black and white" image, by replacing the colors of the image.

 

Sepia

Applies a 'Sepia' filter on the image.

 

GrayScales

Transforms the image to "gray scales" by replacing the colors of the image.

 

Sharpness

Allows the user to define the 'sharpness' of the image.

 

CompressPNG

Saves the image using PNG format and compression.

 

CompressJPG

Saves the image using JPEG format and compression.

 

ImageToBase64

Gets a Character with the 'base64' representation of the image

 

ImageFromBase64

Gets an image, from a character containing a 'base64' image representation

 

ImageIsSingleColor

This function can be used to check if an image only contains a single color, e.g. image is "All white", or "All black".

This can be useful in some cases if the user wants to check whether an image is empty (all white/all transparent). e.g. can be combined with the "Image Annotations" user control to check if the user has entered a singnature.

 

RoundCrop

Rounds an image. You can pass the border width and color as parameters to add a border.

 

Apply Mask

Adds a new image as a mask to the existing image.

 

Combine

Combines two images, passing the second image, the position on the X and Y axis, width and height of the new image to be combined.

 

NewImage

Generate a new image to which you have to indicate width, height, color and whether it is rounded.

 

NewQRCode

Generates a QR code.