Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

converting image in Binary file

can any one help me to convert the bitmap image to convert in Binary file.
I got the image in clipboard and i can also paste the image in Picture BOX. but i want to store the image in a binary file from the clipboard.
help me Out......

Thanks..........

Comments

  • GenjuroGenjuro Posts: 913
    : can any one help me to convert the bitmap image to convert in Binary file.
    : I got the image in clipboard and i can also paste the image in Picture BOX. but i want to store the image in a binary file from the clipboard.
    : help me Out......
    :
    : Thanks..........

    There is the SaveBitmap function, that saves the contents of a PictureBox to a .bmp file - which is a binary format.
    Other than this, you have to write your own routine.
  • MicroDotMicroDot Posts: 142 ✭✭
    : can any one help me to convert the bitmap image to convert in Binary file.
    : I got the image in clipboard and i can also paste the image in Picture BOX. but i want to store the image in a binary file from the clipboard.
    : help me Out......
    :
    : Thanks..........
    :
    Try this snippet

    [code]

    Private Sub SaveBMP(ByVal strImage As String)
    Picture = Clipboard.GetData(vbCFBitmap)
    SavePicture Picture, strImage
    End Sub

    [/code]

    [hr]

    [b][blue]//MicroDot[/blue][/b]

  • Thanx dear....

    Hey tell me how to store the image in SQL server 2000 database.. by using ADO.. I am having image in a image control now i want to store it in database. and when required it must be retirved in the Image control again...

    Irfan
  • MicroDotMicroDot Posts: 142 ✭✭
    : Thanx dear....
    :
    : Hey tell me how to store the image in SQL server 2000 database.. by using ADO.. I am having image in a image control now i want to store it in database. and when required it must be retirved in the Image control again...
    :
    : Irfan
    :
    Store it as a BLOB

    [hr]

    [b][blue]//MicroDot[/blue][/b]

  • I have taken the feild as Image(equivalent to BLOB).
    1st i am storing the image in binary file then by reading that file i am inserting it it a byte array.. but its not working properly...as we dont know what will the size of binary string.. how will i store the binary string in Database using Recordset. I found Getchunk method but cant code it properly.. do u have a code for this??
  • MicroDotMicroDot Posts: 142 ✭✭
    : I have taken the feild as Image(equivalent to BLOB).
    : 1st i am storing the image in binary file then by reading that file i am inserting it it a byte array.. but its not working properly...as we dont know what will the size of binary string.. how will i store the binary string in Database using Recordset. I found Getchunk method but cant code it properly.. do u have a code for this??
    :

    Can you provide your code you have sofar to store the BLOB?

    [hr]

    [b][blue]//MicroDot[/blue][/b]

  • Hey man i have completed the work. actually i was making a small mistake while storing the image . Now its all working fine. Thanks for Replying
    Irfan
Sign In or Register to comment.