Aurigma Forums
»
General Discussion
»
Web Site
»
Drawing multiple smart objects issues
Rank: Newbie
Groups: Member
Joined: 6/22/2018(UTC) Posts: 1
|
I have one psd files which have three smart object and i need to pass different image for each layer. I have tried many times but did not get success. My smart objects frame names are below :- Frontimg Backimg Leftimg I need to pass different images for each layer image. I have tried different way but not get success. My code mentioned below :- Code: var psdProcessor = new PsdProcessor();
psdProcessor.FrameCallback = (processor, frame) =>
{
if (frame.Type == FrameType.SmartObject && frame.Name == "Backimg")
{
string str = @"../../_Input/Copenhagen_CMYK.jpg"; //front img
var smartFrame = (PsdSmartFrame)frame;
return smartFrame.ToGraphicsContainer(ImageReader.Create(str),
ResizeMode.ImageFill);
}
else if (frame.Type == FrameType.SmartObject && frame.Name == "Frontimg")
{
string str = @"../../_Input/Frame.png";
var smartFrame = (PsdSmartFrame)frame;
return smartFrame.ToGraphicsContainer(ImageReader.Create(str),
ResizeMode.ImageFill);
}
else if (frame.Type == FrameType.SmartObject && frame.Name == "Leftimg")
{
string str = @"../../_Input/Apple.jpg";
var smartFrame = (PsdSmartFrame)frame;
return smartFrame.ToGraphicsContainer(ImageReader.Create(str),
ResizeMode.ImageFill);
}
else
{
return processor.ProcessFrame(frame);
}
};
psdProcessor.Render(@"../../_Input/Model-ex.psd", @"../../_Output/RenderMugPreview.png");
I got render image only "Copenhagen_CMYK.jpg" for all smart objects frames. Edited by moderator Friday, June 22, 2018 7:51:28 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member
Groups: Member
Joined: 7/4/2017(UTC) Posts: 43
Was thanked: 11 time(s) in 11 post(s)
|
Could you please share your PSD file?
Regards, Andrew
|
|
|
|
Aurigma Forums
»
General Discussion
»
Web Site
»
Drawing multiple smart objects issues
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.