Error on Image.Load() System.OutOfMemoryException

Hi,

I need to load an image stream (JPG) , to save later in PDF format.

However in some cases, the instruction

var image = Aspose.Imaging.Image.Load (input)

generates an exception of the “Image loading failed” with an inner exception of the System.OutOfMemoryException type.

Below is the stack trace

in Aspose.Imaging.Image. (StreamContainer, LoadOptions)
in Aspose.Imaging.Image.Load (Stream stream, LoadOptions loadOptions)
in Aspose.Imaging.Image.Load (Stream stream)
in [...]

There some workaround or option to prevent the error?
What are there maximum file size that can be converted?

Attached the image file and the code used.

example.jpeg (2.8 MB)
ConvertFile.CS.zip (415 Bytes)

@Nunzio,

I have worked with sample code and image shared by you using latest Aspose.Imaging 18.6 on my end. I have not been able to observe the issue on my end and request you to please try using suggested version on your end.