I have an Application written mostly in a PCL. When consuming this in an WPF Application I have a platformspecific codeblock that looks like this:
BitmapSource bitmapSource = BitmapSource.Create(generic.Width, generic.Height, 300, 300, PixelFormats.Bgra32, null, generic.ByteArray, generic.Stride);
bitmapSource.Freeze();
return bitmapSource;
where 'generic' is the PCL's platformagnostic representation of an image.
Now I want to Write an UWP Application based on this PCL, but BitmapSource.Create does not seem to exist there. What are my alternatives?
Update: I should inform that the PCL is under my control, in other Words I can change the behaviour if my approach is wrong. What I need is some way to display an image, which is generated in the PCL, pixel by pixel, in both WPF and UWP.