Closed BBUBBA closed 5 years ago
Thank you for your feedback. I could advice you to start here: https://archive.codeplex.com/?p=razorgdipainter This is how to draw bitmaps fast in winforms/wpf
Thank you Reply To me ^^
I checked Your Comment ..
But.. i Don't Know T_T
I Want Show Rtsp Frame in Winforms.
I Try this...
var postVideoDecodingParameters = new PostVideoDecodingParameters(RectangleF.Empty,
new Size(targetWidth, targetHeight),
ScalingPolicy.Stretch, PixelFormat.Bgr24, ScalingQuality.Bicubic);
IDecodedVideoFrame decodedFrame = decoder.GetDecodedFrame(bufferSegment, postVideoDecodingParameters);
//Bitmap bmp = new Bitmap(decodedFrame.DecodedBytes.Array);
Bitmap bmp = new Bitmap(decodedFrame.Width, decodedFrame.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
//Create a BitmapData and Lock all pixels to be written
System.Drawing.Imaging.BitmapData bmpData = bmp.LockBits(
new Rectangle(0, 0, bmp.Width, bmp.Height),
System.Drawing.Imaging.ImageLockMode.WriteOnly, bmp.PixelFormat);
Marshal.Copy(decodedFrame.DecodedBytes.Array, decodedFrame.DecodedBytes.Offset,
bmpData.Scan0, decodedFrame.DecodedBytes.Count);
bmp.UnlockBits(bmpData);
bmp.Save("C:\\TEST1234.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
Just try to use RazorPainterWFCtl and write decodedFrames to RazorBMP bitmap (see such property in RazorPainterWFCtl ) in work cycle. Then call RazorPaint method.
Thank you ~!~!~!
I Try that But Not Fast..
i Just use picturebox;;
if i want use image Stretch Function.. i have to Set 32bit project...
That is Not Slow ^^;; ( 64bit Project is Very Slow..... When i try change Image... i don't know why.. but 32bit is so fast...)
Thank you ~!!!!^^
and have a nice day ^^
I can't say where is problem here. If you care about performance, just try to use ScalingQuality.Bilinear. It's significant cheaper than Bicubic interpolation.
it's very good performance example...
thank you ^^
but... i want know something...
how can i render in winform....
i can't understand... Deep copy....
help me . T.T
have a nice day and really thank you !!