[OutSystems Now] Compress photo taken from the phone camera

[OutSystems Now] Compress photo taken from the phone camera

  
Forge Component
(34)
Published on 24 Nov (13 days ago) by OutSystems
34 votes
Published on 24 Nov (13 days ago) by OutSystems

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