How do I load large files

Whenever I load a file larger than 100MB, I am always told that the file failed to load. What is the size of the file I loaded in aspose. PSD? If the 300MB files and 400MB files are not over the limit, how do I load them? Can you tell me what’s wrong?
Is it the wrong way to load PSD files or the free license does not allow to load too large files? Could you please introduce the difference between the four free licenses applied? I am trying to use your product for development. If I cannot load files of around 1GB, it will affect my final decision. Looking forward to your reply. Thank you.
The version of Aspose.PSD I use is 20.12.0. I am developing under .Net Core 3.1.
If the license is not the reason, please provide me with the correct method of loading? Still the correct way to configure it. Due to upload restrictions, I cannot provide the loaded PSD file, but I can load a file of about 80MB smoothly with the same code.
Looking forward to your reply

using (PsdImage image = (PsdImage)Image.Load(sourcePath + fileName+".psd"))
这是我所使用的加载语句

@InTheeeend

We have tested an in house PSD file with 20000 x 20000 pixels with the size 1.5gb, and opened it in Aspose.PSD and then save to Png. It takes 12 minutes and 16 gb of RAM on our end to save it, but I saved it successfully.

Can you please share your PC parameters (64bit or 32bit, RAM and Drive Space volume) and what’s exception you are getting along with Operating System details. Can you please also confirm if you are using x86 based or x64 based application settings in Visual Studio. You need to have x64 based application for this scenario.

Aspose.PSD.CoreExceptions.ImageLoadException: Image loading failed.
—> Aspose.PSD.CoreExceptions.ImageFormats.PsdImageException: Cannot load data. There is not enough bytes to read from stream.
at ???.(StreamContainer , Int64 )
at ???.(StreamContainer )
at ???.(StreamContainer , String& , ClassID& )
at ???.Load(StreamContainer , Int32 )
at Aspose.PSD.FileFormats.Psd.Layers.LayerResourcesRegistry.LoadResourceByFirstSupportedDescriptor(Stream stream, Int32 psdVersion)
at???.(StreamContainer , ??? , Int64 )
at???.(StreamContainer , ??? , Int64 , LayerSectionType&, BlendMode& )
at???.(StreamContainer , Int32 , ??? , IColorPalette, ??? , ?? )
at???.(StreamContainer , ??? , IColorPalette , ???, ?? )
at???.(StreamContainer , ??? , IColorPalette , Boolean, ?? )
at ???.Load(StreamContainer , LoadOptions )
at Aspose.PSD.Image.(StreamContainer , LoadOptions )
— End of inner exception stack trace —
at Aspose.PSD.Image.(StreamContainer , LoadOptions )
at Aspose.PSD.Image.Load(String filePath)
at Insight.Aspose.Multi_Language.UpdateTextLayer.Main(String[] args) in D:\C Sharp Code\Insight.Aspose.Multi_Language\Insight.Aspose.Multi_Language\UpdateTextLayer.cs:line 64
00:00:02.4578747

My memory is 32gb,
500gb solid state drive,
AMD Ryzen 5 3600 6-Core Processor 3.60 GHz,
gtx1650 graphics card1611026636(1).png (11.6 KB)

1611026848(1).png (24.6 KB)
Uploading: 1611026848(1).png…

In addition, the following problems occurred in my program, can you give me a hint? The reason for this problem. Do I need to upload the corresponding code? Due to the large size of the psd file, I may not be able to provide the content of the file.

@InTheeeend

It seems to be an issue with API while working with your file. Please share the source file reproducing the issue. Since it is large file, therefore please upload that on some file server and share the download link with us.

ChineseController.zip (1.2 KB)

I’ll provide you with a portion of the code

[Amazon URL BigFile2.psd]
This is the file loading problem
[Amazon URL face.psd]
This is the file in question with the API you mentioned

If the above content cannot be downloaded, this is the new download address I provide to you.

This is the file loading problem

This is the file in question with the API you mentioned

@InTheeeend

I have created a ticket with ID PSDNET-810 in our issue tracking system to further investigate the issue on our end. I request you to please don’t remove the shared files until the issue gets resolved. We will share the notification with you as soon as the issue will be fixed.

The second text layer not instantiate the problem, according to our test, under the visual studio2019 version, under the condition of any CPU and x64 debug, may lead to the problem, because I am amd CPU, may also be because at the time of loading the PSD file, I gave the new PsdImage PSD file assignment object, as a parameter to recycle.
After I changed the location of the loop, the problem was solved after I changed from using an object in a loop to reading the same PSD file in a loop. I hope you can follow up.

In addition, could you please give me a specific solution to the problem of large files, such as the need to set the memory buffer, or the need to set what content, in what form to load. Because all four loading methods I’ve used so far have failed.

@InTheeeend

Actually, when you use x64 based application, you get a statistically infinite program memory space. Where as in case of x86 based application, you only get 3 GB program memory space. Therefore, for large files, its is recommended to use x64 based application.
As far as ticket PSDNET-810 is concerned, it is not termed as an issue of loading big file but an issue with API for loading a particular file.

Hi I am also having trouble with large files - is there a performance difference between using .net core on a linux machine vs. .net on windows? what are the best practices for .net core?

do you have a suggestion for requirements for a cloud based app which regularly needs to open 100-500 mb PSD files? RAM/ vCPUs or GPUs ? should we use azure , or should the non-microsoft cloud services be fine?
I am just getting started with this project and would like to know what the best path is. thanks

@larrysm

I suggest you to please provide the source file reproducing the issue so that I may associate that as well with this ticket so that it may also get fixed once issue will be addressed. Please also consider my comments shared in last post regarding using x64 based application.

The issues you have found earlier (filed as PSDNET-810) have been fixed in this update.