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. The Lounge
  3. Loading jpg image using openGL

Loading jpg image using openGL

Scheduled Pinned Locked Moved The Lounge
tutorialgraphicsgame-dev
21 Posts 16 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.
  • C Christian Graus

    Abu Mami wrote:

    Some have to have the red pixels loaded first, others the transparent pixels, and so on.

    JPEGs do not have transparency information, you're thinking of PNG

    Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

    A Offline
    A Offline
    Abu Mami
    wrote on last edited by
    #12

    Christian Graus wrote:

    JPEGs do not have transparency information,

    You're right of course. That certainly changes the entire method that I described. Not sure how that affects the input port and the requirement for lining up the pixels in single file. Looks like I'll have to rethink this.

    Christian Graus wrote:

    you're thinking of PNG

    Actually, I wasn't thinking of anything. At the time, my mind was stuffed with transparent pixels.

    1 Reply Last reply
    0
    • J jagannathan thiruvengadathan

      Hello friend, Have a great day!. Could you please guide me, how to load the .jpg image file using openGL. Awaiting for your reply. Regards, Jagan

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #13

      Before I get round to mocking you, I'll save you a little time - this is the lounge, where the demigods strut their stuff posing philosophical questions that mere mortals such as yourself could not hope to understand. Here in the lounge, we are all genius supermodels and if you can't live up to our high standards, then you had better have your fireproof underwear on because your ass is going to get mighty hot as the flames lick away at your fundamentals. I know that you aren't one of the beautiful people because we all know that you don't ask programming questions in the lounge, so I can only assume that you are one of the usual lazy, ugly troglodyte types who occassionally wander in wearing that gazelle near the waterhole look while the Lions are sitting nearby. Obviously, we are much smarter than you. If you want a comparison then imagine that our brains are the size of Jupiter and that yours is the size of something really really small (say your brain). It's obvious from this that you aren't likely to be winning any smart awards.

      Deja View - the feeling that you've seen this post before.

      My blog | My articles

      A J 2 Replies Last reply
      0
      • M Malcolm Smart

        In future, if you post programmnig questions in the lounge, please make sure you mark it for the Attention of Peter O'Hanlon, in the subject line. That will ensure we have at least one quality post in the lounge and saves us the time of ridiculing you personally.

        Small angry dogs

        P Offline
        P Offline
        Pete OHanlon
        wrote on last edited by
        #14

        Malcolm Smart wrote:

        if you post programmnig questions in the lounge, please make sure you mark it for the Attention of Peter O'Hanlon, in the subject line.

        :laugh: I seem to have some sort of reputation.

        Deja View - the feeling that you've seen this post before.

        My blog | My articles

        1 Reply Last reply
        0
        • J jagannathan thiruvengadathan

          Hello friend, Have a great day!. Could you please guide me, how to load the .jpg image file using openGL. Awaiting for your reply. Regards, Jagan

          F Offline
          F Offline
          Francois Gasnier
          wrote on last edited by
          #15

          You first need to load the jpg using gdi+, then get a pointer to pixel buffer, do some work on it and create an opengl texture based on the reworked buffer. Use google and chek algorithm that deals with texture resizing.

          ___________________________________________________________ On the whole human beings want to be good, but not to good and not quite all the time - George Orwell

          1 Reply Last reply
          0
          • P Pete OHanlon

            Before I get round to mocking you, I'll save you a little time - this is the lounge, where the demigods strut their stuff posing philosophical questions that mere mortals such as yourself could not hope to understand. Here in the lounge, we are all genius supermodels and if you can't live up to our high standards, then you had better have your fireproof underwear on because your ass is going to get mighty hot as the flames lick away at your fundamentals. I know that you aren't one of the beautiful people because we all know that you don't ask programming questions in the lounge, so I can only assume that you are one of the usual lazy, ugly troglodyte types who occassionally wander in wearing that gazelle near the waterhole look while the Lions are sitting nearby. Obviously, we are much smarter than you. If you want a comparison then imagine that our brains are the size of Jupiter and that yours is the size of something really really small (say your brain). It's obvious from this that you aren't likely to be winning any smart awards.

            Deja View - the feeling that you've seen this post before.

            My blog | My articles

            A Offline
            A Offline
            Anton Afanasyev
            wrote on last edited by
            #16

            Pete O'Hanlon wrote:

            If you want a comparison then imagine that our brains are the size of Jupiter and that yours is the size of something really really small (say your brain)

            :-D:laugh:;P

            :badger:

            1 Reply Last reply
            0
            • J jagannathan thiruvengadathan

              Hello friend, Have a great day!. Could you please guide me, how to load the .jpg image file using openGL. Awaiting for your reply. Regards, Jagan

              M Offline
              M Offline
              marky777
              wrote on last edited by
              #17

              Firstly, recover from the obvious brain damage you have sustained. Secondly, read warnings before you post queries. M

              A 1 Reply Last reply
              0
              • C code frog 0

                Of course he noticed it. Just like I did. He wants an answer to his question. I think from now on all PQ's should get an answer just not the one they are looking for nor any mention of them being in the wrong place. If they really need help and posted in the wrong place they'll figure it out in time. :laugh:

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

                Darwin?

                Visit http://www.notreadytogiveup.com/[^] and do something special today.

                1 Reply Last reply
                0
                • P Pete OHanlon

                  Before I get round to mocking you, I'll save you a little time - this is the lounge, where the demigods strut their stuff posing philosophical questions that mere mortals such as yourself could not hope to understand. Here in the lounge, we are all genius supermodels and if you can't live up to our high standards, then you had better have your fireproof underwear on because your ass is going to get mighty hot as the flames lick away at your fundamentals. I know that you aren't one of the beautiful people because we all know that you don't ask programming questions in the lounge, so I can only assume that you are one of the usual lazy, ugly troglodyte types who occassionally wander in wearing that gazelle near the waterhole look while the Lions are sitting nearby. Obviously, we are much smarter than you. If you want a comparison then imagine that our brains are the size of Jupiter and that yours is the size of something really really small (say your brain). It's obvious from this that you aren't likely to be winning any smart awards.

                  Deja View - the feeling that you've seen this post before.

                  My blog | My articles

                  J Offline
                  J Offline
                  JudyL_MD
                  wrote on last edited by
                  #19

                  Now that got the morning off to a great start! :laugh: :laugh: I do so love the ability to insult someone while remaining exquisitely polite. Judy

                  1 Reply Last reply
                  0
                  • M marky777

                    Firstly, recover from the obvious brain damage you have sustained. Secondly, read warnings before you post queries. M

                    A Offline
                    A Offline
                    Alaric_
                    wrote on last edited by
                    #20

                    ok....first, this is in the wrong location. Note this fact, and don't post this kind of stuff in the lounge again or someone like me will not come along to help....although I'm not going to provide full help. ....Mostly, because this post is in the wrong spot lol. OpenGL doesn't have any intrinsic functions build into the fixed-function pipeline for loading jpegs. You have to manually parse them yourself using jpeg loading techniques that you would use in any program that you would want to load a jpeg(not just OpenGL) ....I would suggest loading the jpeg into memory, procedurally generating a texture from this in-memory image, and mapping it to a 2D quad that is in the same orientation as the screen. Boom....jpeg ....Try looking at the C# message board for a thread that was composed on July 2, 2007. You'll get your answer.

                    "I need build Skynet. Plz send code"

                    1 Reply Last reply
                    0
                    • J jagannathan thiruvengadathan

                      Hello friend, Have a great day!. Could you please guide me, how to load the .jpg image file using openGL. Awaiting for your reply. Regards, Jagan

                      E Offline
                      E Offline
                      El Corazon
                      wrote on last edited by
                      #21

                      jagannathan thiruvengadathan wrote:

                      how to load the .jpg image file using openGL.

                      Well, see you take a stream file read it in as raw bites (not bytes -- check your options), send it to your double cosine function yuv got (yuv got one right?) and color space your results together. Sorry, but the DevIL made me tell you this...

                      _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                      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