Memory issues with large images (JPEG

Is there any update on large image support for JPEG, PNG?

results.PNG (132.0 KB)

We’ve been doing some testing on our end and seeing large memory issues with converting jpeg, png with large file sizes.

We primarily convert all of our images to jpeg, png for use in our system.

@drakegens,

I have observed the image shared by you and like to share that whether images is of 547 MB. However, when it is loaded in using Aspose.Imaging it gets loaded in Document Object Model (DOM) of Aspose.Imaging and many statics are also initialized. So, it definitely takes more memory in Aspose.Imaging objects for obvious reasons. If you still feel that it is taking much more memory, you may share the source image, working sample project along with statistics with us. We shall, investigate that further on our end to help you out.

Here is a minimum working code sample. Replace the file path with your own file path. I’ve also included the image. Using aspose-imaging 19.1

import com.aspose.imaging.Image;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;

public class Test
{
public static void main(String[] args) throws IOException {
byte[] imageBytes = Files.readAllBytes(Paths.get(“C:/aaImages/halfGigImage.png”));
try(ByteArrayInputStream inputStream = new ByteArrayInputStream(imageBytes))
{
Image image = Image.load(inputStream);
}
}
}

@drakegens,

I have observed the sample code. However, as requested earlier, if you feel not agree to my explanation then provide us the source file that you are using and statistics achieved on your end in order to load that.