Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to retrieve images stored blob and physically store them

Status
Not open for further replies.

JawwadLone

Programmer
Mar 17, 2004
57
PK
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:

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


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top