I am working on an app that uses agrahams excellent jpeg library to load in and edit a jpeg.
Larger jpegs crash the app with an out of memory error because obviously on a smaller device such as a phone you cannot allocate say 20 Mb for processing a jpeg (which a pic taken by a digital camera can exceed, based on logs of processing tests I have done done in b4a).
Is there a way to discover the amount of free ram on the device and then to calculate the amount of memory the picture would take (it doesn't have to be an exact calculation, a rough idea would help)?
Thanks
Dave
Larger jpegs crash the app with an out of memory error because obviously on a smaller device such as a phone you cannot allocate say 20 Mb for processing a jpeg (which a pic taken by a digital camera can exceed, based on logs of processing tests I have done done in b4a).
Is there a way to discover the amount of free ram on the device and then to calculate the amount of memory the picture would take (it doesn't have to be an exact calculation, a rough idea would help)?
Thanks
Dave