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. HBITMAP to Jpeg data stream?

HBITMAP to Jpeg data stream?

Scheduled Pinned Locked Moved C / C++ / MFC
c++sysadminalgorithmsquestion
5 Posts 2 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.
  • A Offline
    A Offline
    Arcrest
    wrote on last edited by
    #1

    i want to get jpeg data stream from a valid HBITMAP and transfer it through network. I can do this by first creating a jpg file and then reading the data from the file and at last sending it out,but it is not effective,so is there a more effective solution?(i don't want to get into the complexity of jpeglib) (English is not my native language,sorry for my bad English)

    B 1 Reply Last reply
    0
    • A Arcrest

      i want to get jpeg data stream from a valid HBITMAP and transfer it through network. I can do this by first creating a jpg file and then reading the data from the file and at last sending it out,but it is not effective,so is there a more effective solution?(i don't want to get into the complexity of jpeglib) (English is not my native language,sorry for my bad English)

      B Offline
      B Offline
      basementman
      wrote on last edited by
      #2

      Using the Intel Jpeg Library (IJL), you can convert to jpeg directly in-memory, allowing you to convert from DIB to jpeg and write the jpeg out to whatever medium you wish (file, socket, pipe, etc.).  onwards and upwards...

      A 1 Reply Last reply
      0
      • B basementman

        Using the Intel Jpeg Library (IJL), you can convert to jpeg directly in-memory, allowing you to convert from DIB to jpeg and write the jpeg out to whatever medium you wish (file, socket, pipe, etc.).  onwards and upwards...

        A Offline
        A Offline
        Arcrest
        wrote on last edited by
        #3

        Thank you a little problem,it seems that IJL only deals with the 24bit Jpeg files

        B 1 Reply Last reply
        0
        • A Arcrest

          Thank you a little problem,it seems that IJL only deals with the 24bit Jpeg files

          B Offline
          B Offline
          basementman
          wrote on last edited by
          #4

          Yes, that is correct. You will need to convert to a 24 bit jpeg. There is a really nice class called CDibImage (on CP, I think or available at http://www.naughter.com/[^]) by P.J. Naughter that makes these types of things really easy.  onwards and upwards...

          A 1 Reply Last reply
          0
          • B basementman

            Yes, that is correct. You will need to convert to a 24 bit jpeg. There is a really nice class called CDibImage (on CP, I think or available at http://www.naughter.com/[^]) by P.J. Naughter that makes these types of things really easy.  onwards and upwards...

            A Offline
            A Offline
            Arcrest
            wrote on last edited by
            #5

            Thank you,i have got it

            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