Resize image after upload or via batch process

0
Hi i have a Mendix app used via Android and iOS tablets. Images from `camera roll` are uploaded via drop zone. Everything work just fine, but I want to reduce the size of the images after they have succesfully been uploaded and committed in order to save disk storage. Is it possible to process images larger than a certain size either determined by megabyte or pixels to a defined max width or height (px). Images must be scaled down proportionally without ‘black’ borders. Looking forward to learn what you do ! Regards  Morten  
asked
2 answers
0

Hi Morten,

You could setup an after commit event on the entity or use a scheduled event to run a microflow that does this. To get the image size, you could use the "Size" attribute on the File Document entity, or use the community commons java action "getImageDimensions" (depending on what what your requirement is). To resize the image, you could play around with the "DuplicateImageDocument" java action. This has parameters for width and height in pixels. Additionally there is a module for image resizing in the app store but it was made in Mx 4, so not too sure if it will work in Mx 7.

Hope this helps!

answered
0

Hi

first of all thank you for the quick reply.

I only find the thumb width/height in DublicateImageDocument.

Guess that won’t change image size ?

M.

answered