On Windows I am able to set the background image of a textbox with the following code:
using (var surface = SkiaSharp.SKSurface.Create(new SkiaSharp.SKImageInfo(100, 100)))
{
Telerik.Reporting.Processing.TextBox textbox;
using (var image = surface.Snapshot())
using (var data = image.Encode())
{
byte[] imageData = data.ToArray();
using (var ms = new MemoryStream(imageData))
{
textbox.Style.BackgroundImage.ImageData = System.Drawing.Image.FromStream(ms);
}
}
}
Image.FromStream has the following error:
"CA1416: This call site is reachable on all platforms. 'Image.FromStream(Stream)' is only supported on: 'windows' 6.1 and later."
What is the Linux compatible version of Image.FromStream()?