Compressing Image size from File picker

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
paularstall
Posts: 11
Joined: Tue Oct 09, 2018 2:09 am

Compressing Image size from File picker

Post by paularstall » Fri Apr 03, 2020 9:02 pm

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.

atostaine
Posts: 565
Joined: Wed Jan 20, 2016 7:38 am

Re: Compressing Image size from File picker

Post by atostaine » Sat Apr 04, 2020 2:23 am

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.
Art Tostaine

soa
Posts: 339
Joined: Mon Dec 07, 2015 3:15 pm

Re: Compressing Image size from File picker

Post by soa » Mon Apr 06, 2020 9:06 am

How would rewriting the app in VLWEB improve the upload speed?

atostaine
Posts: 565
Joined: Wed Jan 20, 2016 7:38 am

Re: Compressing Image size from File picker

Post by atostaine » Mon Apr 06, 2020 9:09 am

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.
Art Tostaine

soa
Posts: 339
Joined: Mon Dec 07, 2015 3:15 pm

Re: Compressing Image size from File picker

Post by soa » Mon Apr 06, 2020 9:20 am

Sorry I misread the VLWIN as VLWEB - we've been web focused for so long windows applications never occur to me.

atostaine
Posts: 565
Joined: Wed Jan 20, 2016 7:38 am

Re: Compressing Image size from File picker

Post by atostaine » Mon Apr 06, 2020 9:58 am

Us too that’s why we wrote it in web first.
Art Tostaine

soa
Posts: 339
Joined: Mon Dec 07, 2015 3:15 pm

Re: Compressing Image size from File picker

Post by soa » Mon Apr 06, 2020 2:47 pm

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.

Post Reply