←Select platform

CreateFromHtmlImageData Method

Summary
Creates a new instance of RasterRenderBuffer with the specified values from a HTML 5 Canvas ImageData object.
Syntax
C#
VB
public static RasterRenderBuffer CreateFromHtmlImageData(  
   int imageDataWidth, 
   int imageDataHeight, 
   byte[] imageData 
) 
Public Shared Function CreateFromHtmlImageData( _ 
   ByVal imageDataWidth As Integer, _ 
   ByVal imageDataHeight As Integer, _ 
   ByVal imageData() As Byte _ 
) As RasterRenderBuffer 

Parameters

imageDataWidth
The pixel width of the image data. Set this to ImageData.width. Must be a value greater than 0.

imageDataHeight
The pixel height of the image data. Set this to ImageData.height. Must be a value greater than 0.

imageData
The pixels data. Set this to ImageData.data. 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

imageDataWidth

Height

imageDataHeight

BitsPerPixel

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

Order

RasterByteOrder.Rgb since RGB color data is the format used by HTML Canvas ImageData.

Internal buffer data

This method will call SetDataArray with imageData.

Requirements

Target Platforms

Help Version 21.0.2021.6.30
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Converters Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.