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 can I get a jpeg picture's array of pixels by using GDI+?

How can I get a jpeg picture's array of pixels by using GDI+?

Scheduled Pinned Locked Moved C / C++ / MFC
questionwinformsgraphicsdata-structures
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.
  • P Offline
    P Offline
    pqcyy
    wrote on last edited by
    #1

    Thanks!;)

    J B P 3 Replies Last reply
    0
    • P pqcyy

      Thanks!;)

      J Offline
      J Offline
      Joe Woodbury
      wrote on last edited by
      #2

      Use Bitmap::GetHBITMAP() then call GetObject() with the handle that's returned. Use this to get the dimensions and then call GetBitmapBits() using an array of the correct size. Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke

      P 1 Reply Last reply
      0
      • P pqcyy

        Thanks!;)

        B Offline
        B Offline
        Bo Hunter
        wrote on last edited by
        #3

        Check out the Bitmap class on MSDN check out the LockBits method. Thank You Bo Hunter

        1 Reply Last reply
        0
        • P pqcyy

          Thanks!;)

          P Offline
          P Offline
          pqcyy
          wrote on last edited by
          #4

          Thank Joe Woodbury and Bo Hunter,I will try them.:-D

          1 Reply Last reply
          0
          • J Joe Woodbury

            Use Bitmap::GetHBITMAP() then call GetObject() with the handle that's returned. Use this to get the dimensions and then call GetBitmapBits() using an array of the correct size. Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke

            P Offline
            P Offline
            pqcyy
            wrote on last edited by
            #5

            Joe Woodbury: I have used the method that you said,but I can't display the picture by using opel glDrawPixels(). why?

            J 1 Reply Last reply
            0
            • P pqcyy

              Joe Woodbury: I have used the method that you said,but I can't display the picture by using opel glDrawPixels(). why?

              J Offline
              J Offline
              Joe Woodbury
              wrote on last edited by
              #6

              I have no idea. Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke

              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