
var psdProcessor = new PsdProcessor(Path.GetTempPath());
//Set the callback for rendering text frames.
psdProcessor.StringCallback = (processor, textFrame) =>
{
if (updatedLayers.ContainsKey(textFrame.Name))
{
object placeholder = updatedLayers[textFrame.Name];
return placeholder.ToString();
}
return textFrame.Text;
};
//Set the callback for rendering image frames.
psdProcessor.FrameCallback = (processor, frame) =>
{
if ((frame.Type != FrameType.Raster) || (!updatedLayers.ContainsKey(frame.Name)))
return processor.ProcessFrame(frame);
return frame.ToGraphicsContainer(ImageReader.Create(updatedLayers[frame.Name].ToString()), ResizeMode.ImageFill);
};
psdProcessor.FrameCallback = (processor, frame) =>
{
return processor.ProcessFrame(frame);
};
psdProcessor.Render(filePath, output);
By using these code i m getting required result but in some files i m facing problems.i implemented your advice but no change.previously i m using below code,
//using (Aurigma.GraphicsMill.Bitmap bitmap = RasterizePsd(filePath, updatedLayers))
{
bitmap.Save(output);
}

Only this image coming like this all other images are coming properly.but by using photoshop dll this image is coming properly.but the problem with photoshop is that u have to open photoshop in the background otherwise it will not work.for that reason i m using graphics mill.
Edited by user Wednesday, May 2, 2018 11:10:43 PM(UTC)
| Reason: Not specified