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. how to convert byte array of .jpg and .jp2 images to Bitmap byte array in VC++?

how to convert byte array of .jpg and .jp2 images to Bitmap byte array in VC++?

Scheduled Pinned Locked Moved C / C++ / MFC
c++graphicsdata-structurestutorialquestion
6 Posts 3 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.
  • K Offline
    K Offline
    kapardhi
    wrote on last edited by
    #1

    Hai ! I have an byte array of an image. I donot know whether the image is an .bmp or .jpg or .jp2 image. I want to convert this byte array into Bitmap byte array i.e I want to convert (.bmp or .jpg or .jp2) image to .bmp image? Thanks!

    CPalliniC H 2 Replies Last reply
    0
    • K kapardhi

      Hai ! I have an byte array of an image. I donot know whether the image is an .bmp or .jpg or .jp2 image. I want to convert this byte array into Bitmap byte array i.e I want to convert (.bmp or .jpg or .jp2) image to .bmp image? Thanks!

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

      kapardhi wrote:

      I donot know whether the image is an .bmp or .jpg or .jp2 image.

      Maybe you don't know the image format at all. How are we supposed to know it, instead? You may try to interpretate your image data as RGB (or greyscale) components. :rolleyes:

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
      [My articles]

      In testa che avete, signor di Ceprano?

      H 1 Reply Last reply
      0
      • K kapardhi

        Hai ! I have an byte array of an image. I donot know whether the image is an .bmp or .jpg or .jp2 image. I want to convert this byte array into Bitmap byte array i.e I want to convert (.bmp or .jpg or .jp2) image to .bmp image? Thanks!

        H Offline
        H Offline
        Hamid Taebi
        wrote on last edited by
        #3

        For convert formats you can use of CImage class I dont think you can use of it for jp2 but you can find good article on the codeproject for helpful info about image formats search for CXImage article (of course you dont need to convert bmp to bmp ;) ).

        Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )

        1 Reply Last reply
        0
        • CPalliniC CPallini

          kapardhi wrote:

          I donot know whether the image is an .bmp or .jpg or .jp2 image.

          Maybe you don't know the image format at all. How are we supposed to know it, instead? You may try to interpretate your image data as RGB (or greyscale) components. :rolleyes:

          If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
          This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
          [My articles]

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #4

          I think your answer was perfect because you got 1 if it was wrong you got 5. :)

          Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )

          CPalliniC 1 Reply Last reply
          0
          • H Hamid Taebi

            I think your answer was perfect because you got 1 if it was wrong you got 5. :)

            Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )

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

            Thank you for balancing, pal. :-D He continues posting again and again, without recognizing what is the actual hurdle: he know nothing about the content of 'the byte array'. :)

            If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
            This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
            [My articles]

            In testa che avete, signor di Ceprano?

            K 1 Reply Last reply
            0
            • CPalliniC CPallini

              Thank you for balancing, pal. :-D He continues posting again and again, without recognizing what is the actual hurdle: he know nothing about the content of 'the byte array'. :)

              If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
              This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
              [My articles]

              K Offline
              K Offline
              kapardhi
              wrote on last edited by
              #6

              Sorry for repling lately! Thankyou! I will first try to gain knowledge in Images and their formats etc. all the stuff then i will try to code my requirement then i may iask my doubts to you. Thanks!

              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