3

What's the difference between the a Bitmap and a WriteableBitmap? I want to display a video stream on a C# form, which would be more suitable in terms of efficiency? isn't a normal bitmap also editable using unsafe code?

Furqan Safdar
  • 16,260
  • 13
  • 59
  • 93
Ouais Alsharif
  • 317
  • 1
  • 4
  • 16
  • 2
    WriteableBitmap is for Wpf, Bitmap is used in GDI+/Winforms. Which one do you want? There are also other ways to render video in either technology, aren't you interested in those as well? –  Mar 09 '12 at 20:45
  • I'm doing it in GDI+ (I think its faster than WPF) and yes of course! I'm interested in finding out the fastest way to draw a video on a screen, I'm trying to draw kinect's video output if that helps – Ouais Alsharif Mar 09 '12 at 20:46

2 Answers2

2

WriteableBitmap inherits from System.Windows.Media.ImageSource

Bitmap inherits from System.Drawing.Image

Looks like Bitmap was pre wpf/silverlight where Writeablebitmap is after

Micah Armantrout
  • 6,781
  • 4
  • 40
  • 66
0

You can find a good answer there about what is the real difference between Bitmap and WriteableBitmap:

Bitmap and WriteableBitmap

And about streaming video in C# :

Stream Video C# Solution

Community
  • 1
  • 1
ChapMic
  • 26,954
  • 1
  • 21
  • 20