How to reduce memory usage of Image.load()


I have a problem with high memory usage when I upgrade aspose-imaging:

Version loading the PSD = 100MB memory usage
Version 19.7 loading the PSD = 850MB memory usage

Same thing happens for TIF files.

Here’s an example PSD file:

com.aspose.imaging.imageloadoptions.PsdLoadOptions loadOptions = new com.aspose.imaging.imageloadoptions.PsdLoadOptions();
com.aspose.imaging.Image image = com.aspose.imaging.Image.load(in, loadOptions);

setReadOnlyMode(true) has helped a lot with performance, but memory usage is still too high.

I’ve tried using the other setters in PsdLoadOptions, but nothing makes the memory usage lower.

I want the memory usage of Image.load() to be 100MB again. Is this possible? Is there something I’m missing?

I have also tried aspose-psd, the memory usage is still 850MB (too high).




I have observed your requirements and have created an issue with ID IMAGINGJAVA-1386 as investigation to further investigate the issue on our end. This thread has been linked with the issue so that you may be notified once the issue will be fixed.