Hi, I try to import an image to PSD, it’s successful, but
is a normal Layer, how to be a smartobjectLayer.
Thank you all for your guidance.
code following:
using (var image = (PsdImage)Aspose.PSD.Image.Load(@"C:\001.psd"))
{
string filePath = @"C:\test.jpg";
using (var stream = new FileStream(filePath, FileMode.Open))
{
Layer layer = null;
try
{
layer = new Layer(stream);
image.AddLayer(layer);
}
catch (Exception e2)
{
if (layer != null)
{
layer.Dispose();
}
throw e2;
}
}
image.Save(@"C:\003.psd");
}
Hi, Yes, I have read this article before.
I hope that the layer will be converted to a smart object layer and saved as a PSD. When using Adobe Photoshop open it is still a smart object layer.
I tried the new code and Run was successful and save PSD successful , but the output PSD cannot Open with Adobe Photoshop,Thank you.
using (PsdImage image = (PsdImage)Image.Load(@"C:\test1.psd"))
{
image.SmartObjectProvider.ConvertToSmartObject(1);
//Layers[1] convert to smart object layer
image.Save(@"C:\test1ok.psd", new PsdOptions(image));
image.Dispose();
}
I have created a ticket with ID PSDNET-790 in our issue tracking system 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.
Actually, the reported issue has not been for PSD failing to open in Photoshop. Can you please share the Photoshop version along with snapshot of the issue so that we may verify that further on our end.