JawwadLone
Programmer
hi
i m storing images in oracle 9i .
i m getting them back in byte array .i want to convert the byte array into jpeg image and store them physically on the local disk.i m having problem while converting the byte array in jpeg. i m trying the following code:
i m storing images in oracle 9i .
i m getting them back in byte array .i want to convert the byte array into jpeg image and store them physically on the local disk.i m having problem while converting the byte array in jpeg. i m trying the following code:
Code:
Dim RowPR_PICTURES As PR_PICTURESDS.PR_PICTURESRow
RowPR_PICTURES = objPR_PICTURESDB.getByPK_PR_PICTURES(ctrFormToolbar.RecordId)
Dim imgPhoto() As Byte
'Dim imgfile As File
' Dim StreamOfPhoto As New MemoryStream
Response.Clear()
Dim EmployeeID As Integer = 0
Dim EmployeePhoto As System.Drawing.Image
Dim StreamOfPhoto As New MemoryStream(imgPhoto)
With RowPR_PICTURES
imgPhoto = .L_PIC
StreamOfPhoto.Write(imgPhoto, 10, imgPhoto.Length - 10)
EmployeePhoto = Bitmap.FromStream(StreamOfPhoto)
EmployeePhoto.Save("c:\test.jpg", System.Drawing.Imaging.ImageFormat.Jpeg)
End With