0

I understand that it can be used as an image source for wpf files but can someone take me through all of it's inputs and what they signify, as well as the importance of each component. Also I'm confused as to what a bitmap is, should it be called in a program; is it an array? A string? I found the description on MSDN unclear. An example of what I'm talking about is below.

colorBitmap = new WriteableBitmap(sensor.ColorStream.FrameWidth,    
     sensor.ColorStream.FrameHeight, 96.0, 96.0, PixelFormats.Bgr32, null);
user2864740
  • 60,010
  • 15
  • 145
  • 220
Brian
  • 11
  • 4
  • 4
    Ref. [WritableBitmap](http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.writeablebitmap(v=vs.110).aspx): "Provides a BitmapSource that can be *written to* and updated." – user2864740 Feb 18 '14 at 04:11
  • 1
    A bitmap is a data structure for storing image data. It's a big block of memory that stores the color of each pixel (and sometime the alpha channel too - depends on the color depth). – Matt Burland Feb 18 '14 at 04:13

2 Answers2

2

I recently answered pretty same question -

A WriteableBitmap can be used to write new bytes in order to update the UI. This enables us to use the same WriteableBitmap and use the same resources in memory but only update the content.

In my tutorial I explain how you can use it in a Kinect scenario!

Tom Kerkhove
  • 2,151
  • 5
  • 26
  • 42
1

A WritableBitmap is a bitmap source that can written to and updated, as @user2864740 said. A bitmap "Represents a single, constant set of pixels at a certain size and resolution." Writable bitmaps are often used instead of normal bitmaps because they are much more cost effective and better for streaming video like in Kinect. This essentially means that it is an image that is updated, without recreating a new variable every frame.

Liam McInroy
  • 4,339
  • 5
  • 32
  • 53