Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. convert binary file to image/bmp file in vc++

convert binary file to image/bmp file in vc++

Scheduled Pinned Locked Moved C / C++ / MFC
c++helptutorial
23 Posts 9 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S shiv nand

    Actullay it is converted as binary file in linux, i have to convert binary file back to image in windows, i dont know how to convert.

    C Offline
    C Offline
    Chris Losinger
    wrote on last edited by
    #11

    nobody knows what you mean by "binary file"

    image processing toolkits | batch image processing

    S 1 Reply Last reply
    0
    • S shiv nand

      i have binary image data i have to convert back to image file. ex : image.bmp converted to binary file image.bin. Now i have to convert "image.bin" binary file back to image.( imgage.bin to image.bmp).

      C Offline
      C Offline
      Cedric Moonen
      wrote on last edited by
      #12

      Just change the extension ?

      Cédric Moonen Software developer
      Charting control [v3.0] OpenGL game tutorial in C++

      1 Reply Last reply
      0
      • C Chris Losinger

        nobody knows what you mean by "binary file"

        image processing toolkits | batch image processing

        S Offline
        S Offline
        shiv nand
        wrote on last edited by
        #13

        what actually i want,i have a device it scans finger(finger print information)and it stores as a file(in binary format).I have to convert this file to finger print image.

        D C 2 Replies Last reply
        0
        • S shiv nand

          what actually i want,i have a device it scans finger(finger print information)and it stores as a file(in binary format).I have to convert this file to finger print image.

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #14

          You'll first need to figure out what a .bin file is (i.e., it's format).

          "One man's wage rise is another man's price increase." - Harold Wilson

          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

          "Man who follows car will be exhausted." - Confucius

          S 1 Reply Last reply
          0
          • S shiv nand

            what actually i want,i have a device it scans finger(finger print information)and it stores as a file(in binary format).I have to convert this file to finger print image.

            C Offline
            C Offline
            Chris Losinger
            wrote on last edited by
            #15

            until you explain what this "binary format" is, nobody can help you.

            image processing toolkits | batch image processing

            S 1 Reply Last reply
            0
            • D David Crow

              You'll first need to figure out what a .bin file is (i.e., it's format).

              "One man's wage rise is another man's price increase." - Harold Wilson

              "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

              "Man who follows car will be exhausted." - Confucius

              S Offline
              S Offline
              shiv nand
              wrote on last edited by
              #16

              i have image.bmp it is saved in image.bin file format, bin is the file format.

              L D 2 Replies Last reply
              0
              • S shiv nand

                i have image.bmp it is saved in image.bin file format, bin is the file format.

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #17

                jiya-123 wrote:

                i have image.bmp it is saved in image.bin file format, bin is the file format.

                bin is not a format, merely an extension on the name of the file. You need to understand the actual format of the contents in order to convert it into a bitmap. Go back to the documentation for the program that created the file to see exactly how it is formatting the data. It is impossible to answer your question without that information.

                Just say 'NO' to evaluated arguments for diadic functions! Ash

                1 Reply Last reply
                0
                • S shiv nand

                  i have image.bmp it is saved in image.bin file format, bin is the file format.

                  D Offline
                  D Offline
                  David Crow
                  wrote on last edited by
                  #18

                  Good luck.

                  "One man's wage rise is another man's price increase." - Harold Wilson

                  "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                  "Man who follows car will be exhausted." - Confucius

                  1 Reply Last reply
                  0
                  • C Chris Losinger

                    until you explain what this "binary format" is, nobody can help you.

                    image processing toolkits | batch image processing

                    S Offline
                    S Offline
                    shiv nand
                    wrote on last edited by
                    #19

                    sorry .bin is the file extension.

                    M L 2 Replies Last reply
                    0
                    • S shiv nand

                      sorry .bin is the file extension.

                      M Offline
                      M Offline
                      Maximilien
                      wrote on last edited by
                      #20

                      Yeah, but what is the INTERNAL format of the .bin file? I could rename a .bmp file to a .bin file and it would still be a BMP file.

                      Watched code never compiles.

                      1 Reply Last reply
                      0
                      • S shiv nand

                        Hi how to convert binary file to bmp/jpg image. I have to convert image(BMP/JPG) to binary file and binary file to image(BMP/JPG). Please help. Thanks in advance.

                        A Offline
                        A Offline
                        AmbiguousName
                        wrote on last edited by
                        #21

                        you should present some code here and pin point the problem. May be you are not telling the problem as you should be telling (well im not sure about that tooo).:thumbsup:

                        1 Reply Last reply
                        0
                        • S shiv nand

                          sorry .bin is the file extension.

                          L Offline
                          L Offline
                          Lost User
                          wrote on last edited by
                          #22

                          jiya-123 wrote:

                          sorry .bin is the file extension. Quote Selected Text

                          You have repeated this enough times; try answering the basic question: what is the format of the data in the file? If you do not understand what we are asking then you are never likely to resolve this issue.

                          Just say 'NO' to evaluated arguments for diadic functions! Ash

                          1 Reply Last reply
                          0
                          • S shiv nand

                            Hi how to convert binary file to bmp/jpg image. I have to convert image(BMP/JPG) to binary file and binary file to image(BMP/JPG). Please help. Thanks in advance.

                            A Offline
                            A Offline
                            aresthelord
                            wrote on last edited by
                            #23

                            For example : let's assume that program uses a code like this: #include<iostream> void convertToASCII() { FILE *bmp; FILE *ASCII; bmp=fopen("1.bmp","r"); ASCII=fopen("1.bin","w"); char c; int x; while( (c = fgetc( bmp )) != EOF ) { for( x = 0; x < 8; x++ ) fputc( '0' + !!(c&(1<<x)), ASCII ); } } int main() { convertToASCII(); } you are looking for the function that converts back the bin file to bmp i guess.. as far as i understood your question is this.. am i right?

                            1 Reply Last reply
                            0
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • World
                            • Users
                            • Groups