How to save?

i’m making psd.

using Aspose.PSD.FileFormats.Psd.Layers;
using Aspose.PSD.FileFormats.Psd;
using Aspose.PSD;

string path = @“d:”;
string psdFile = Path.Combine(path, “test.psd”);
string psdFileSave = Path.Combine(path, “test2.psd”);
new License().SetLicense(“Aspose.PSD.NET.lic”);

using (var pfile = (PsdImage)Aspose.PSD.Image.Load(psdFile))
{
foreach (var x in pfile.Layers)
{
if (x.DisplayName.IndexOf(“test-translate”) != -1)
{
var text = (TextLayer)x;
text.UpdateText(“save”);

    }
}

pfile.Save(File.OpenWrite(psdFileSave));

}

this code error…?
캡처.PNG (28.2 KB)

@blackshining
I checked your code with my PSD file and it saves correctly.
Can you provide your PSD file? maybe an issue with it.

Also, FYI, you don’t have to use the ‘File.OpenWrite’ method for export to a file, the ‘pfile.Save(psdFileSave);’ will work fine too.

test.zip (5.9 KB)

here this file.

@blackshining
I checked your code with your provided file and got the exception.
I created a task to fix this issue.
You will be notified when it’s done.

@blackshining
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-1548

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.

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