Image compression

1
Hi all,  We’re creating a finance module for our app where users will be able to upload receipts, however most people use a smartphone to take the photos so they are very high quality. Is there anyway to compress the image once it hits the mendix platform, as we don’t need them at such a high quality anyway.  Many thanks,  Garion
asked
4 answers
3

I think a custom Java action would be the way. Stackoverflow to the resque: https://stackoverflow.com/questions/18573774/how-to-reduce-an-image-file-size-before-uploading-to-a-server

Regards,

Ronald

 

answered
1

Yeah, for client side you make a widget using something like https://github.com/brunobar79/J-I-C (this one we’ve used with html5 camera, but you can also use it on image files) and then upload the compressed image. For server side compression is just regular java stuff

answered
1

You'd probably want to do the compression on the client side.

otherwise you can use the cropImage Java action which works well.

 

answered
0

Hey Garion Swann, that's a great a idea for making an app like finance and you are right everyone take photos from their smartphone and they are very high quality. There are a lot of image compression application available on internet such as Jpeg Compressor it compress images very efficiently and it supports a lot of formats and IrfanView it also provide good features for image compression. So you can choose these or you can search on internet too. Thank you.

answered