-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Saving as image file from SIPSorceryMedia.Abstractions.RawImage #45
Comments
Tried with:
but no luck. If I change Avalonia.Platform.PixelFormat.Bgra8888 or Avalonia.Platform.PixelFormat.Rgba8888, getting error 'Unable to create bitmap from provided data' |
Tried with:
but no luck. If I change Avalonia.Platform.PixelFormat.Bgra8888 or Avalonia.Platform.PixelFormat.Rgba8888, getting error 'Unable to create bitmap from provided data' |
I have converted SIPSorceryMedia.Abstractions.RawImage rawImage to System.Drawing.Bitmap with the following code: Bitmap bitmap = new Bitmap(rawImage.Width, rawImage.Height, rawImage.Stride, PixelFormat.Format24bppRgb, rawImage.Sample); After that converted this to Avalonia.Media.Imaging.Bitmap with the following code: System.Drawing.Bitmap bitmapTmp = new System.Drawing.Bitmap(bitmap); AND it is working in Windows platform. To work in cross-platform (Win, Linux, OSX), I want to convert SIPSorceryMedia.Abstractions.RawImage rawImage to Avalonia.Media.Imaging.Bitmap directly. Any help in this regards? |
If I can get IList bgraPixelData from SIPSorceryMedia.Abstractions.RawImage then it can be converted to Avalonia.Media.Imaging.WriteableBitmap public static WriteableBitmap CreateBitmapFromPixelData (
In SIPSorceryMedia.Abstractions.PixelConverter class there are several pixel format conversion functions. But I am looking for RGBToBGRA. Any Help? |
Nearly the same question than #47 Please read my answer: #47 (comment) |
How to save a image file from SIPSorceryMedia.Abstractions.RawImage?
Is it possible to create MemoryStream from SIPSorceryMedia.Abstractions.RawImage?
Actually want to convert SIPSorceryMedia.Abstractions.RawImage to Avalonia.Media.Imaging.Bitmap.
Any help in this regard.
The text was updated successfully, but these errors were encountered: