D
DraguVaso
Hi,
In my application I receive a Byte Stream (Dim bytFile() As Byte) which
contains a jpeg-picture, which I want to display in a picturebox.
I want to display it directly from the bytfile() without first writing it to
a file and than reading it. Does anybody knows how to do this?
I hae alreaddy a solution with writing it to a file, but the next time i
want to do it I get an exception that the file is still in sue when I want
to write to it. So to get aroudn this kind of problems I want something
without file...
My code with the file:
Dim strPicLoc As String
strPicLoc = "C:\test.jpeg"
'picture
RetStatus = EIDlib1.GetPicture(MapColPicture, CertifCheck)
Dim br As New BinaryWriter(File.OpenWrite(strPicLoc))
Dim bytFile() As Byte
bytFile = MapColPicture.GetValue("Picture")
br.Write(bytFile)
br.Flush()
br.Close()
br = Nothing
'show the picture in the picturebox!
picPicture.Image = Image.FromFile(strPicLoc)
Thanks a lot in advance,
Pieter
In my application I receive a Byte Stream (Dim bytFile() As Byte) which
contains a jpeg-picture, which I want to display in a picturebox.
I want to display it directly from the bytfile() without first writing it to
a file and than reading it. Does anybody knows how to do this?
I hae alreaddy a solution with writing it to a file, but the next time i
want to do it I get an exception that the file is still in sue when I want
to write to it. So to get aroudn this kind of problems I want something
without file...
My code with the file:
Dim strPicLoc As String
strPicLoc = "C:\test.jpeg"
'picture
RetStatus = EIDlib1.GetPicture(MapColPicture, CertifCheck)
Dim br As New BinaryWriter(File.OpenWrite(strPicLoc))
Dim bytFile() As Byte
bytFile = MapColPicture.GetValue("Picture")
br.Write(bytFile)
br.Flush()
br.Close()
br = Nothing
'show the picture in the picturebox!
picPicture.Image = Image.FromFile(strPicLoc)
Thanks a lot in advance,
Pieter