Problem update Text Layer

Aspose.PSD for .NET Version 19.5.0.0

“Can not locate global resource occurance of text”

bug.jpg (125.2 KB)

@hunsup,

Can you please share source file which you used on your end so that we may further investigate to help you out.

        //ExStart:UpdateTextLayerInPSDFile
        // The path to the documents directory.
        string dataDir = RunExamples.GetDataDir_PSD();

        // Load a PSD file as an image and cast it into PsdImage
        using (PsdImage psdImage = (PsdImage)Image.Load(dataDir + "layers.psd"))
        {
            foreach (var layer in psdImage.Layers)
            {
                if (layer is TextLayer)
                {
                    TextLayer textLayer = layer as TextLayer;
                    textLayer.UpdateText("test update", new Point(0, 0), 15.0f, Color.Purple);
                }
            }

            psdImage.Save(dataDir + "UpdateTextLayerInPSDFile_out.psd");
        }

Error in the sample code provided
textLayer.UpdateText(“test update”, new Point(0, 0), 15.0f, Color.Purple);

‘Aspose.PSD.CoreExceptions.ImageFormats.PsdImageException’
==> “Can not locate global resource occurance of text”

@hunsup,

Can you please share source PSD file which you used on your end.

layers.zip (403.9 KB)

It’s a layers.psd you’re offering sample.

@hunsup,

I have worked with source files and have been able to observe issue. A ticket with ID PSDNET-161 has been created in our issue tracking system for further investigate and resolve. This thread has been associated with this ticket, so that you can be automatically notified as soon as this issue is resolved.

The issues you have found earlier (filed as PSDNET-161) have been fixed in this update.