I am trying to create psd file with .Net, its working fine, but i can see one layer on bottom named Background in all files alongwith the layers which i added. I want to overwrite the base layer with my first image, how to do that?
image.png (26.1 KB)
In the above image, top three layer images I have added and saved.
The actual i need is like below
image.png (4.9 KB)
Here is the code for saving psd file
Aspose.PSD.License license = new Aspose.PSD.License();
// Initialize PsdImage class object
PsdImage image = new PsdImage(width, height);
Layer layer = null;
for (int i = 0; i < count * 2; i = i + 2)
string fname = args[i + 3];
string lname = args[i + 4];
Stream stream = new FileStream(fname, FileMode.Open); layer = new Layer(stream); layer.DisplayName = lname; // Add input image as layer to PSD image image.AddLayer(layer); stream.Close();
string outputpath = args[len - 1];
Also, is there any size limit for the files to add in layer ? because, sometimes if i save with bigger size image, then psd file is saving with 0 kb.