Page 1 of 1

Compressing Image size from File picker

Posted: Fri Apr 03, 2020 9:02 pm
by paularstall
Hi
Im using the file picker control to select an image in a web application which then writes the image to a database table as a BLOB.

With camera resolutions getting larger and larger these days, image sizes can be very big even when the settings are set to minimum on the device.

My question therefore would be is there a way in Lansa to automatically compress a selected image down to a specific size before we save it to our database, or would I need to rely on an external tool to do the compression before the users selects the image?

Any guidance would be hugely appreciated

Paul.

Re: Compressing Image size from File picker

Posted: Sat Apr 04, 2020 2:23 am
by atostaine
I don't have an answer for you, but we had terrible speeds when saving images to IBM i.

I had to rewrite the app in VL-WIN and deploy it.

Re: Compressing Image size from File picker

Posted: Mon Apr 06, 2020 9:06 am
by soa
How would rewriting the app in VLWEB improve the upload speed?

Re: Compressing Image size from File picker

Posted: Mon Apr 06, 2020 9:09 am
by atostaine
I rewrote in vl-win. Maybe they web has to chunk the data and reverse transmission a lot?

The listener has to be more efficient than http.

Re: Compressing Image size from File picker

Posted: Mon Apr 06, 2020 9:20 am
by soa
Sorry I misread the VLWIN as VLWEB - we've been web focused for so long windows applications never occur to me.

Re: Compressing Image size from File picker

Posted: Mon Apr 06, 2020 9:58 am
by atostaine
Us too that’s why we wrote it in web first.

Re: Compressing Image size from File picker

Posted: Mon Apr 06, 2020 2:47 pm
by soa
With Webevent functions we use a JavaScript library from www.plupload.com which is available under an AGPL license which allows client side image resizing which obviously speeds up the uploads hugely. For passport style photos We've gone from 12-20 meg images down to < 90k which still do the job.

It would be ideal if LANSA could incorporate some of this technology into their uploader or failing that some genius out there to write a widget around it.