C# Class Microsoft.DwayneNeed.Media.Imaging.GrayscaleBitmap

The GrayscaleBitmap class processes a source and converts the image to a grayscale color scheme.
For simplicity, we only process Bgr32 or Bgra32 formatted bitmaps, anything else is converted to one of those formats. Bgr32 and Bgra32 share the same memory layout for the RGB channels.
Inheritance: ChainedBitmap
Mostra file Open project: cplotts/WPFSLBlendModeFx

Protected Methods

Method Description
CopyPixelsCore ( System.Windows.Int32Rect sourceRect, int stride, int bufferSize, IntPtr buffer ) : void

Requests pixels from the ChainedCustomBitmapSource.

Converts the contents of the source bitmap into a grayscale color scheme. The algorithm is taken from here: http://en.wikipedia.org/wiki/Grayscale

Method Details

CopyPixelsCore() protected method

Requests pixels from the ChainedCustomBitmapSource.
Converts the contents of the source bitmap into a grayscale color scheme. The algorithm is taken from here: http://en.wikipedia.org/wiki/Grayscale
protected CopyPixelsCore ( System.Windows.Int32Rect sourceRect, int stride, int bufferSize, IntPtr buffer ) : void
sourceRect System.Windows.Int32Rect /// The rectangle of pixels being requested. ///
stride int /// The stride of the destination buffer. ///
bufferSize int /// The size of the destination buffer. ///
buffer System.IntPtr /// The destination buffer. ///
return void