Create a memory stream object and assign it to the image. The memory stream reads the binary data from the image and stores it in memory. This binary data is later transferred to a binary array. The following code creates the memory stream and saves the image:
Dim ms As new MemoryStream()
"theImage" is the ID of the image located on your Visual Basic form. This image element points to a location of an image on the hard drive.