Using javascript to resize image with specified px on width or height.
Input is binary, output is base64.
Useful for limiting image data size when send from mobile to backend.
Parameter :
Image : Binary data image
Quality : Quality of resize in percent
WidthHeight : reduce to size based on Width (True) or Height (False)
ResizeTo : number of px from Width or Heigth
ResultBase64 : the result in base64