Hello,
When I am trying to add images into layer, for small file, its working fine, but if with bigger dimensions (for eg. 7270 x 5871), then its showing memory exception error.
below is the error
image.png (12.6 KB)
This is the original image
tmppsd_0.zip (405.7 KB)
Also, even if the image size is very small, but while saving as psd, its size become more (for eg, original image size is 5.08MB with dimension 5298 x 2728 and the output file is with 55.6MB. I saved the same in photoshop, size is very less compare to above saving method. Is there anyway to compress the image without disturbing the original ?
Please suggest.
Regards,
Gopinath.
@gopituka
Can you please share the working sample code along with source file and used sample code. I will try to reproduce the issue further on my end and possibly log that in our issue tracking system for resolution.
@gopituka
Can you please share the working sample code along with source file and used code so that I may help you further in this regard.
Hello,
Please find the code and source image file in the zip file attached.
Here is the arguments passed with that.
“1” “7270” “2871” “D:\tmppsd_0.png” “Background Image” “D:\111.PSD”
Here is the file
forpsd.zip (406.2 KB)
Regards,
Gopi.
@gopituka
I have tried to reproduce the issue using Aspose.PSD for .NET 21.8 and PSD is generated without any issue. I have attached the used sample project for your convenience too. I cannot share the generated PSD file with you as it was 325MB.
ConsoleApp4.zip (6.9 KB)
Hi,
Thanks for your time.
Sorry for small mistake.
The image size in the arguments should be 7270 and 5871 (i gave as 2871)
“1” “7270” “5871” “D:\tmppsd_0.png” “Background Image” “D:\111.PSD”
Please try with this and check whether you can able to reproduce.
As you can see, the output file size 325 MB, why this much increase in file size (original file size is only 620 kb)? Is there anyway to reduce the size?
Also, which lib set you are using among the given image below ?
image.png (1.4 KB)
I am using .Net framework 4.7.2, VS 2015
Regards,
Gopi.
@gopituka
Even with this dimension there is no issue on end for sample project that I have shared with you.
image.png (62.8 KB)
Thank you Mudassir, let me try again and let you know.
1 Like
Hello,
I tried again, but getting the same error. I am attaching the complete solution what I am using. this is the same solution what you gave, only dll and lic added from my side what i am using.
Please try with this and check the issue. I think dll version might be the issue (or the license ? i am using Developer OEM license)
ConsoleApp4_new.zip (3.0 MB)
Regards,
Gopinath.
@gopituka
Can you please share the snapshot of the issue along with Operating System end environment details on your end. There is no issue of product license here. As long as it gets loaded for product, it will work.
Ok, now what I did is, created a new solution in VS 2017 and added same set of code and references, then it works fine.
Previously I tried with VS 2015, may be something is corrupted.
Thanks Mudassir.
Also, the size of PSD file is very heavy. Is there a way to reduce that? for eg, saving this single layer image as PSD gives us 488 MB file.
Regards,
Gopi.
@gopituka
It’s good to know the things are fine on your end. May be it was related to .NET Framework conflict on your end.
I am afraid there is no such implementation. All you can do is to have a reduced dimensions to get the reduced size.
Ok, thanks Mudassir. will try that.