mendix / CommunityCommons

This module adds a number reusable Java methods to your project, which can be called from Microflows or custom Java actions.
Apache License 2.0
13 stars 57 forks source link

GetImageDimensions can crash Mendix app when processing high resolution images #126

Open klatter opened 2 years ago

klatter commented 2 years ago

The current version of GetImageDimensions makes use of Java's BufferedImage, which loads the image uncompressed into memory. This can cause an out of memory exception using this java action with a a high resolution image.

The new implementation is based on the stackoverflow post below and avoids loading the image uncompressed into memory. https://stackoverflow.com/questions/672916/how-to-get-image-height-and-width-using-java