Free Support Forum - aspose.com

Layers are lost when converting TIFF to PSD (C# .NET)

Hi,

I used the online demo app and upload a TIFF with 2 layers inside and saved as PSD.
The resulting PSD has lost the layers and transparency despite both formats supporting layers + transparencyTestLayersAndTransparency.zip (3.6 MB)
.
And there a bad Alpha Channel which does not make any sense.
The example TIFF is attached.

Please help. Thanks in advance.

Best Regards
Yahia

@it-yeq,

Can you please provide the sample code that you have used along with generated file having issues. Can you please share the link to which online demo app you are using so that we may assist you further in this regard.

Hi,

the problem is the same (latest version, NuGet) - see code below.
The correct result with the sample image is attached (from Photoshop).

Best Regards
Yahia
TestLayersAndTransparencyCorrect.zip (3.6 MB)

private void button3_Click(object sender, EventArgs e)
{
string vSourceFile = “”;

using (OpenFileDialog vOD = new OpenFileDialog())
{
if (vOD.ShowDialog() == DialogResult.OK)
{ vSourceFile = vOD.FileName ?? “”; }
};

if (string.IsNullOrEmpty(vSourceFile))
{ return; }

var vLic = new Aspose.Imaging.License();
vLic.SetLicense(new System.IO.MemoryStream(Properties.Resources.Conholdate_Total_NET));

var vIMG = (Aspose.Imaging.FileFormats.Tiff.TiffImage) Aspose.Imaging.Image.Load(new System.IO.MemoryStream(System.IO.File.ReadAllBytes(vSourceFile)), new Aspose.Imaging.LoadOptions() { UseIccProfileConversion = true });

vIMG.Save(vSourceFile + “ZZ_.psd”, new Aspose.Imaging.ImageOptions.PsdOptions());
}

@it-yeq,

I have tested the file shared by you and have been able to observe the issue specified. An issue with ID IMAGINGNET-3970 has been created in our issue tracking system to investigate and resolve the issue. I have linked this thread with the issue so that we may notify you once issue will be fixed.

@it-yeq,

We have investigated the Tiff file on our end. Actually, the source file has one page, on which the image is placed on a white background without transparency. From such an image we cannot get the desired PSD.

Actually the source file has 1 layer with transparency - please open it in Photoshop, there you can see this.

@it-yeq,

Thank you for feedback. We will get back to you with feedback as soon as it will be shared.