LoadImageFromBytes Method
Description
Loads image from a byte array with the specified file format.
ActiveX Edition | Plug-in Edition | Mac Edition |
---|---|---|
Since V6.0 | Since V6.0 | Since V6.4 |
Syntax
ObjectName.LoadImageFromBytes(Uint32 bufferSize, Variant * buffer, long ImageType)
Parameters
Uint32 bufferSize: Specifies the buffer size.
Variant * buffer: A byte array of the image data.
long ImageType: Specifies the file format.
Return value
True indicates success. False indicates failure.
Remarks
Dynamic Webcam supports the following types of image files:
Allowed Values | ImageType |
0 | BMP |
1 | JPEG |
2 | TIFF |
3 | PNG |
4 |
The loaded image will be displayed in the Dynamic Webcam.
When an error occurs and IfThrowException property is TRUE, an exception will be thrown.
When FALSE is returned or an exception is thrown, check ErrorCode property and ErrorString property for error information.
See also
LoadImage method, LoadImageEx methodSample
Javascript Sample:
Webcam.SelectedImagesCount = 2; Webcam.SelectedImageIndex(0) = 4;// add put_ or set_ prefix Webcam.SelectedImageIndex(1) = 3; var size = Webcam.GetSelectedImagesSize(2); Array ary = new Array(size); Webcam.SaveSelectedImagesToBytes(size, ary); Webcam.LoadImageFromBytes(size, ary, 2);
Copyright © 2012 Dynamsoft Corporation.All Rights Reserved.