Open Monsok opened 8 years ago
There is no concept of "undo", the rendering chain produces an output given an input and the effects in the rendering chain and their parameters. To get a different output simply change the rendering chain and then call RenderAsync() on your renderer again.
Thanks! Based on your suggestion, I just feed the original image source as IImageProvider and call RenderAsync() again. Something like
public async Task RenderOriginal(IImageProvider sourceImage)
{
if (m_swapChainPanelRenderer == null)
{
m_swapChainPanelRenderer = new SwapChainPanelRenderer(sourceImage, SwapChainPanel);
}
m_swapChainPanelRenderer.RenderOptions = Lumia.Imaging.RenderOptions.Mixed;
m_swapChainPanelRenderer.Source = sourceImage;
await m_swapChainPanelRenderer.RenderAsync().AsTask().ConfigureAwait(false);
}
Exactly.
How do I undo an applied effect? I could not find an example in the source code.