How do I save/render an <Image> element as a file using the managed SDK?
Posted: 13 Feb 2019, 20:40
I have this BitmapSource property:
The above property is populated by reading an image from disk into a buffer "bytes" and then by calling Create:
This image is displayed in the Ui like this:
That all works fine. But now suppose I manipulate the <Image> element, transform it, add overlays to it, whatever... and then want to to save that back to a file.
How would I do that? I can't find any managed example that do anything like that although I've found multiple suggestions to "render it to a texture" but usually referencing the native SDK.
I'm currently just testing this in Windows 10, starting with the HelloWorld example, which I've added to.
Code: Select all
public BitmapSource RecalledImage { get; set; }
Code: Select all
RecalledImage = Noesis.BitmapSource.Create(file.Width, file.Height, 96, 96, bytes, file.Width * 3, BitmapSource.Format.BGR8);
Code: Select all
<Image x:Name="imageElement" Source="{Binding Path=RecalledImage}"/>
How would I do that? I can't find any managed example that do anything like that although I've found multiple suggestions to "render it to a texture" but usually referencing the native SDK.
I'm currently just testing this in Windows 10, starting with the HelloWorld example, which I've added to.