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. binary data to image VC++

binary data to image VC++

Scheduled Pinned Locked Moved C / C++ / MFC
c++
14 Posts 4 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.
  • M Mukund Pradeep

    I am receiving Binary data of an image in 4K chunks through USB. I need to get this data and display the complete image(as GIF) using VC++. Please show me the way(examples preferred).

    CPalliniC Offline
    CPalliniC Offline
    CPallini
    wrote on last edited by
    #2

    What are you receiving exactly?

    In testa che avete, signor di Ceprano?

    1 Reply Last reply
    0
    • M Mukund Pradeep

      I am receiving Binary data of an image in 4K chunks through USB. I need to get this data and display the complete image(as GIF) using VC++. Please show me the way(examples preferred).

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

      Just append each chunk to your array as you receive it and when you have the complete image you display it direct from memory using any one of the image functions in Windows. See http://msdn.microsoft.com/en-us/library/ms534462(v=vs.85).aspx[^] for help on image displaying.

      M 2 Replies Last reply
      0
      • M Mukund Pradeep

        I am receiving Binary data of an image in 4K chunks through USB. I need to get this data and display the complete image(as GIF) using VC++. Please show me the way(examples preferred).

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

        GIF is a format for image storage, it is not a way to display an image.

        image processing toolkits | batch image processing

        1 Reply Last reply
        0
        • L Lost User

          Just append each chunk to your array as you receive it and when you have the complete image you display it direct from memory using any one of the image functions in Windows. See http://msdn.microsoft.com/en-us/library/ms534462(v=vs.85).aspx[^] for help on image displaying.

          M Offline
          M Offline
          Mukund Pradeep
          wrote on last edited by
          #5

          Thanks

          1 Reply Last reply
          0
          • L Lost User

            Just append each chunk to your array as you receive it and when you have the complete image you display it direct from memory using any one of the image functions in Windows. See http://msdn.microsoft.com/en-us/library/ms534462(v=vs.85).aspx[^] for help on image displaying.

            M Offline
            M Offline
            Mukund Pradeep
            wrote on last edited by
            #6

            Thank you. Its proving difficult as I am not used to working with hardware in C++.

            L 1 Reply Last reply
            0
            • M Mukund Pradeep

              Thank you. Its proving difficult as I am not used to working with hardware in C++.

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

              What hardware? Your question is about reading an image file.

              M 1 Reply Last reply
              0
              • L Lost User

                What hardware? Your question is about reading an image file.

                M Offline
                M Offline
                Mukund Pradeep
                wrote on last edited by
                #8

                Yes the image data is passed from a scanner.. I am consolidating the data received in 4k chunks and displaying the image in a window.

                L 1 Reply Last reply
                0
                • M Mukund Pradeep

                  Yes the image data is passed from a scanner.. I am consolidating the data received in 4k chunks and displaying the image in a window.

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

                  And what is your problem?

                  M 1 Reply Last reply
                  0
                  • L Lost User

                    And what is your problem?

                    M Offline
                    M Offline
                    Mukund Pradeep
                    wrote on last edited by
                    #10

                    Nothing right now. I wanted an overview as to how people would approach the problem.

                    L 1 Reply Last reply
                    0
                    • M Mukund Pradeep

                      Nothing right now. I wanted an overview as to how people would approach the problem.

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

                      Approach what problem? It is simply a matter of receiving each chunk of data and appending it to the previous chunk until you have the complete image.

                      M 1 Reply Last reply
                      0
                      • L Lost User

                        Approach what problem? It is simply a matter of receiving each chunk of data and appending it to the previous chunk until you have the complete image.

                        M Offline
                        M Offline
                        Mukund Pradeep
                        wrote on last edited by
                        #12

                        True. But when I posted the question I had no idea about how the image was rendered onto the window.

                        L 1 Reply Last reply
                        0
                        • M Mukund Pradeep

                          True. But when I posted the question I had no idea about how the image was rendered onto the window.

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

                          But that has nothing to do with the issue of transferring a file across a network. And in my first reply I gave you a link to an MSDN page which explains how to display images.

                          M 1 Reply Last reply
                          0
                          • L Lost User

                            But that has nothing to do with the issue of transferring a file across a network. And in my first reply I gave you a link to an MSDN page which explains how to display images.

                            M Offline
                            M Offline
                            Mukund Pradeep
                            wrote on last edited by
                            #14

                            That I figured out. You answered my question.

                            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