G
Guest
Hello all,
I have a byte array that I would like to try and get converted to a bmp image.
I have tried to use this code to do it:
====================================================
Dim imgBuffer(614400) As Byte
Dim ms As MemoryStream = New MemoryStream(imgBuffer)
Dim bmp As Bitmap = New Bitmap(ms)
----------------------------------------------
The dll routine called is:
----------------------------------------------
Private Declare Function hpCamPreviewGetBGR16 Lib "hpcamapi.dll" ( _
ByRef hCamera As IntPtr, _
ByVal pBuffer As Byte()) As UInt32
===================================================
This does not seem to do the trick.
Does anyone have any ideas on how to achieve this in VB.NetCF?
The returned frame in the buffer is suppose to be (width x height x 2) bytes
in size and each pixel is 1 word (2 bytes) in size, with the following format:
RRRRRGGGGGGBBBBB
5-bit LSB is for blue pixel
5-bit MSB is for red pixel
I have a byte array that I would like to try and get converted to a bmp image.
I have tried to use this code to do it:
====================================================
Dim imgBuffer(614400) As Byte
Dim ms As MemoryStream = New MemoryStream(imgBuffer)
Dim bmp As Bitmap = New Bitmap(ms)
----------------------------------------------
The dll routine called is:
----------------------------------------------
Private Declare Function hpCamPreviewGetBGR16 Lib "hpcamapi.dll" ( _
ByRef hCamera As IntPtr, _
ByVal pBuffer As Byte()) As UInt32
===================================================
This does not seem to do the trick.
Does anyone have any ideas on how to achieve this in VB.NetCF?
The returned frame in the buffer is suppose to be (width x height x 2) bytes
in size and each pixel is 1 word (2 bytes) in size, with the following format:
RRRRRGGGGGGBBBBB
5-bit LSB is for blue pixel
5-bit MSB is for red pixel