Can't save the PSD file with some layer

Hello,

I’m trying to export the png image with PSD file,
but I’m getting the error that The rectangle has no common processing area. Cannot proceed.

Caused by: com.aspose.psd.internal.Exceptions.ArgumentException: The rectangle has no common processing area. Cannot proceed.
	at com.aspose.psd.Image.getFittingRectangle(Unknown Source) ~[aspose-psd-24.2-jdk16.jar:24.2]
	at com.aspose.psd.Image.getFittingRectangle(Unknown Source) ~[aspose-psd-24.2-jdk16.jar:24.2]
	at com.aspose.psd.internal.ia.d.a(Unknown Source) ~[aspose-psd-24.2-jdk16.jar:24.2]
	at com.aspose.psd.internal.ia.e.saveArgb32Pixels(Unknown Source) ~[aspose-psd-24.2-jdk16.jar:24.2]
	at com.aspose.psd.internal.ia.f.savePixelsInternal(Unknown Source) ~[aspose-psd-24.2-jdk16.jar:24.2]
	at com.aspose.psd.RasterImage$e.a(Unknown Source) ~[aspose-psd-24.2-jdk16.jar:24.2]
	at com.aspose.psd.RasterImage.a(Unknown Source) ~[aspose-psd-24.2-jdk16.jar:24.2]
	at com.aspose.psd.RasterImage.saveArgb32Pixels(Unknown Source) ~[aspose-psd-24.2-jdk16.jar:24.2]
	at com.aspose.psd.internal.je.k.process(Unknown Source) ~[aspose-psd-24.2-jdk16.jar:24.2]

Here is the file that I’m testing

P.S : Could you let me know what is the meaning of the error message too? It might help to understand for us.

@sherlock.hs could you please provide the code that you used to export file. The file that was used I’ve succesfully downloaded.

@Dmitriy.Sorokin
Dmitriy, here is my code that I use for the test.

Just simple code to export png file from psd file.

       try (InputStream psdFileInputStream = new FileInputStream(psdFile)) {
            var psdLoadOptions = new PsdLoadOptions();
            psdLoadOptions.setLoadEffectsResource(true);
            var psdImage = (PsdImage) Image.load(psdFileInputStream, psdLoadOptions);

            //export
            psdImage.save(convertedPngFileName, new PngOptions());
            psdImage.close();

        } catch (IOException e) {
            e.printStackTrace();
        }

@sherlock.hs
Thank you for bug reproducing information. I can confirm issue.

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

Issue ID(s): PSDJAVA-599,PSDNET-1966

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.

@sherlock.hs I can suggest some temporary workaround:
Please try add “ReadOnlyMode”

   try (InputStream psdFileInputStream = new FileInputStream(psdFile)) {
            var psdLoadOptions = new PsdLoadOptions();
            psdLoadOptions.setLoadEffectsResource(true);
            psdLoadOptions.setReadOnlyMode(true);
            var psdImage = (PsdImage) Image.load(psdFileInputStream, psdLoadOptions);

            //export
            psdImage.save(convertedPngFileName, new PngOptions());
            psdImage.close();

        } catch (IOException e) {
            e.printStackTrace();
        }

@Dmitriy.Sorokin Well, that was just for the test. I’m trying to modify some layers anyway, so I might need to wait until the PSDJAVA-599 ticket is finished.

Is there any other way to save the image with update layer?
Anything like set value with hard coding…

If there is no way to do it then could you let me know how long does bug ticket take usually? It could be really helpful to estimate my schedule.

I appreciate your help.

@sherlock.hs PSDNET-1966 is already in progress. So, , PSDJAVA-599 can be fixed in Aspose.PSD for Java 24.3-24.4 if there are no pitfalls in this issue.

1 Like