No exception in code, but the output is broken

Hi!
I been having issues with several files, where the PSD generated by Aspose.PSD is broken… here’s an example:
input_file.zip (333.5 KB)
I’ve trimmed the issue to its minimal form for this file… 3 images with blur, on a given sized canvas, that’s it. And the trimmed code it’s pretty trivial too:

using (var image = Image.Load(inputFile))
{
    image.Save(outputFile);
}

The code does not fail, but the output (psd file) is broken and cannot be opened in Photoshop (tested in 26.2.0).
If you make the canvas any smaller (even by 1 pixel) or if you remove the blur to any of the images, the output is extremely big (a 2gb output file from a 42mb input file) but at least it opens fine in Photoshop.
This issue was discovered in v24.10.0 but is still happening in v25.1.0.
Please advise.

@gonzalo.gatti.ethofy

It seems you are experiencing issues with the PSD files generated by Aspose.PSD, where the output is broken and cannot be opened in Photoshop. This problem has been noted in previous versions of the library, and it appears to persist in the version you are using.

Here are a few suggestions to troubleshoot and potentially resolve the issue:

  1. Check for Known Issues: There have been reports of similar problems related to PSD files, particularly when using features like smart filters. It’s advisable to check the release notes for any updates or fixes related to your issue. For instance, a previous bug (PSDNET-1036) was confirmed and addressed in a later update, so ensure you are using the latest version of Aspose.PSD.

  2. Modify Your Code: Since you mentioned that changing the canvas size or removing the blur affects the output size and quality, consider experimenting with these parameters. Sometimes, minor adjustments can lead to better compatibility with Photoshop.

  3. File Size Concerns: If the output file size is excessively large, it may indicate that the processing is not optimized. Review your image processing logic to ensure that it is efficient and does not inadvertently increase the file size.

  4. Contact Support: If the problem persists, consider reaching out to Aspose support with detailed information about your issue, including the input file and the specific code you are using. This can help them diagnose the problem more effectively.

If you haven’t already, I recommend checking the latest updates and documentation for any changes that might address your issue.

Sources:

@gonzalo.gatti.ethofy
Thank you for the neat code sample for the reproducing of issue.
Could you please additionally provide files the following files that are used in PSD file:
c:\temp\test\noise_image_5kb(00).jpg
c:\temp\test\noise_image_5kb(01).jpg
c:\temp\test\noise_image_5kb(02).jpg

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PSDNET-2326

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Sorry, my bad… those are just noise images as placeholders, tested with several images (different weights, different sizes) with the same result, … anyways:
noise_images.zip (21.5 KB)

Thanks!

@gonzalo.gatti.ethofy thank you. I’ve added noise images to the ticket. I’ll write you back after the investigation.