[OutSystems Now] Compress photo taken from the phone camera

[OutSystems Now] Compress photo taken from the phone camera

  
Forge Component
(34)
Published on 2016-11-24 by Outsystems R&D
34 votes
Published on 2016-11-24 by Outsystems R&D

Is it possible to compress the photo taken by the phone camera before it is inserted into the DB? I am looking for something similar to WhatsApp's photo compression.


Thanks!

Hi Davis,

You have to use some javascript to do that.

If you search on google you'll find several posts with some examples that you can use. I found this, it basically involves manipulating the image with a canvas:

http://stackoverflow.com/questions/14672746/how-to-compress-an-image-via-javascript-in-the-browser