Gents,
I have this code which saves an "Image" to a SQL Server database:
vb.net Code:
'You have the images in the PictureBoxes, now you need to store it as a Reference Image 'if the user has selected that option Dim ms2 As New MemoryStream() 'Save the image to the MemoryStream DirectCast(CameraTable.Controls("camera" & z.ToString), PictureBox).Image.Save _ (ms2, Imaging.ImageFormat.Bmp) Dim arrImage() As Byte = ms2.GetBuffer db.SaveReferenceImage(arrImage, z)
This basically stores a long string of text in the DB such as:
"0x0asdfwerlkjfasfalskdfjsfj.."
I am working on a PHP site at the moment that is having trouble reading that data to display the image, so I am attempting to not only save it to the DB, but also save it as a bitmap or other file type to the actual server.
How can I create an image file (not really picky on which file type) from the "arrImage()" data above?






Reply With Quote