We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Exporting to PNG for layer with Clipping Mask doesn't work

I found that Aspose.PSD supports for Clipping Mask in this document.

However, when I tried it, clipping mask effect doesn’t works.
The output of PNG file is similar with when clipping mask effect doesn’t exist.
image.jpg (63.4 KB)
The real file looks like this, but exported PNG file looks like this.
image.png (7.4 KB)
This is similar when I disabled clipping mask effects for specific layer.
image.jpg (59.0 KB)

I imported file using this code.

        PsdLoadOptions imageLoadOptions = new PsdLoadOptions();
        PsdImage psdImage = (PsdImage)Image.load(allPath, imageLoadOptions);

and I use this code for export to png.

    PngOptions saveOptions = new PngOptions();
    psdImage.save(filePath + fileName, saveOptions);

I will share for this problematic file.
masking_effect_test.zip (59.0 KB)

This is a very important factor in purchasing your solution to our company…
So I hope there is a solution for this problem.
Thanks a lot!


We need to further investigate the issue on our end and a ticket with ID PSDJAVA-370 has been created to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

Is there any updates?

@ericaHong Could you please clarify what version was used to reproduce this issue? I tried version 21.7 and it looks like clipping mask was applied correctly. I tried release the clipping mask and result was as in PSD also.
ClippingMaskActive.png (41.7 KB)
ClippingMaskReleased.png (38.7 KB)

Thanks for your reply.
I updated my version and tested again, and I checked it works well.
Thanks for your investigation :slight_smile: