Effect loss when working with smart objects

Hello! I have some problem with smart objects. I need to edit data in a inner smart and save. But when I do it without any update, unfortunately the smart loss effect. How to fix it? Many thanks. I have attached a source file. sampledog.zip (2.7 MB)

PsdLoadOptions psdLoadOptions = new PsdLoadOptions();
        psdLoadOptions.LoadEffectsResource = true;

        string inputFile = "c:\\psd\\sampledog.psd";
        using (PsdImage psdImage = (PsdImage)Image.Load(inputFile, psdLoadOptions))
        {
            
            SmartObjectLayer smartObject = FindLayer("smart dog", psdImage) as SmartObjectLayer;
            smartObject.Save("c:\\psd\\1.png", new PngOptions() { ColorType = PngColorType.TruecolorWithAlpha });

            PsdImage smartObjectPsdImage = (PsdImage)smartObject.LoadContents(psdLoadOptions);

            // Doing something with psd...

            // Convert to a smart object again and save psd/smart
            SmartObjectLayer smartObject2 = smartObjectPsdImage.SmartObjectProvider.ConvertToSmartObject(smartObjectPsdImage.Layers);
            smartObjectPsdImage.Save("c:\\psd\\2.png", new PngOptions() { ColorType = PngColorType.TruecolorWithAlpha });
            smartObject2.Save("c:\\psd\\3.png", new PngOptions() { ColorType = PngColorType.TruecolorWithAlpha });
        }

    public Layer FindLayer(string layerName, PsdImage image)
    {
        // Get aa layers in PSD file
        var layers = image.Layers;
        // Find desired layer
        foreach (var layer in layers)
        {
            // Match layer's name
            if (string.Equals(layer.DisplayName, layerName, StringComparison.InvariantCultureIgnoreCase))
            {
                return layer;
            }
        }
        return null;
    }

@Marcus90
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-1471,PSDNET-1472

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.

I found that your issue is caused by the incorrect processing of transparency by black-and-white adjustment layer.

This update can help if the semi-transparency is not important for you.
smartObjectPsdImage.Layers[0].Opacity = 255;
In other case, please wait for Aspose.PSD 23.4, the fix of BW Layer issue is planned on this version.

As I can see, this bug has not been fixed in version 23.4 :frowning:

@Marcus90 these bugs were posponed to 23.5

The issues you have found earlier (filed as PSDNET-1471) have been fixed in this update. This message was posted using Bugs notification tool by yaroslav.lisovskyi