LEADTOOLS WPF and Silverlight (Leadtools.Converters assembly)
LEAD Technologies, Inc

CreateFromWriteableBitmap Method






The pixel width of the bitmap. Set this to WriteableBitmap.PixelWidth. Must be a value greater than 0.
The pixel height of the bitmap. Set this to WriteableBitmap.PixelHeight. Must be a value greater than 0.
The pixels data. Set this to WriteableBitmap.PixelBuffer. Must not be null.
Creates a new instance of RasterRenderBuffer with the specified values from a Windows Runtime WriteableBitmap object. .NET support WinRT support
Syntax
public static RasterRenderBuffer CreateFromWriteableBitmap( 
   int pixelWidth,
   int pixelHeight,
   IBuffer pixelBuffer
)
'Declaration
 
Public Shared Function CreateFromWriteableBitmap( _
   ByVal pixelWidth As Integer, _
   ByVal pixelHeight As Integer, _
   ByVal pixelBuffer As IBuffer _
) As RasterRenderBuffer
'Usage
 
Dim pixelWidth As Integer
Dim pixelHeight As Integer
Dim pixelBuffer As IBuffer
Dim value As RasterRenderBuffer
 
value = RasterRenderBuffer.CreateFromWriteableBitmap(pixelWidth, pixelHeight, pixelBuffer)
public static RasterRenderBuffer CreateFromWriteableBitmap( 
   int pixelWidth,
   int pixelHeight,
   IBuffer pixelBuffer
)
 function Leadtools.Converters.RasterRenderBuffer.CreateFromWriteableBitmap( 
   pixelWidth ,
   pixelHeight ,
   pixelBuffer 
)
public:
static RasterRenderBuffer^ CreateFromWriteableBitmap( 
   int pixelWidth,
   int pixelHeight,
   IBuffer^ pixelBuffer
) 

Parameters

pixelWidth
The pixel width of the bitmap. Set this to WriteableBitmap.PixelWidth. Must be a value greater than 0.
pixelHeight
The pixel height of the bitmap. Set this to WriteableBitmap.PixelHeight. Must be a value greater than 0.
pixelBuffer
The pixels data. Set this to WriteableBitmap.PixelBuffer. Must not be null.

Return Value

The newly created RasterRenderBuffer object.
Remarks

This is a helper method that sets the values of the returned RasterRenderBuffer as follows:

Member Value
Width

pixelWidth

Height

pixelHeight

BitsPerPixel

32. This is the only value supported in this version and cannot be changed.

Order

RasterByteOrder.Bgr since BGR color data is the format used by Windows Runtime WriteableBitmap.

Internal buffer data

This method will call SetDataBuffer with pixelBuffer.

Example

For an example, refer to RasterImageRenderer.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

RasterRenderBuffer Class
RasterRenderBuffer Members

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.