Results 1 to 10 of 10

Thread: how to read a jpg image?

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2002
    Location
    Paris France
    Posts
    4

    how to read a jpg image?

    I suppose it must be easy for you, but I didnt find anything...
    Could you give me a link or a program that reads and draws a jpg image?
    I work with Visual C++.
    Thank you very much.

  2. #2
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    Kristianstad,Skåne,Sweden
    Posts
    1,595

    Re: how to read a jpg image?

    Hi !

    Reading a jpeg image is pretty messy so you should go for a library that can handle it for you, I don't know of any one that works with C++, but I am pretty sure you can find one, at least if you are ok with a GPL or LGPL license. Give google a try.

    Mikael

  3. #3
    Guest

    Re: how to read a jpg image?

    IMHO, the best way to load textures is to use an underlying library like SDL to interface with OpenGL, then use a seperate library (like SDL_image) to load all your textures.

  4. #4
    Senior Member Regular Contributor
    Join Date
    Mar 2001
    Posts
    184

    Re: how to read a jpg image?

    yes jpegs are hard to read, as they are compressed. if you feel you can handle it, go to wotsit to read the jpeg format.

    b

  5. #5
    Senior Member OpenGL Pro
    Join Date
    Jun 2000
    Location
    Shreveport, LA, USA
    Posts
    1,502

    Re: how to read a jpg image?

    http://www.ijg.org/

    Note: though the main page of that site does not say so, the library they have also supports decompression. And the use of this library is not bound by any restrictive license. Your only requirement is to say you are using it.

  6. #6
    Senior Member Regular Contributor
    Join Date
    May 2001
    Location
    Omaha, NE US
    Posts
    119

    Re: how to read a jpg image?

    DevIL's the one that I use. http://sourceforge.net/projects/openil/ It can load just about any image file format you'd ever want, and the API is as simple as hell.

    I think when they compiled it, they used the libs from http://www.ijg.org/ to do Jpegs, though.

  7. #7
    Guest

    Re: how to read a jpg image?


  8. #8
    Senior Member Regular Contributor
    Join Date
    Sep 2001
    Location
    Eastern USA
    Posts
    218

    Re: how to read a jpg image?

    devIL is good, if they could decide on a name once and for all.

    Personally, I'm still an old stand by of the best way to do anything is to do it yourself, but JPGs are such a hassle, it's just so much easier in this case to use pre-written code.

    The important thing is understanding how the file works.

  9. #9
    Senior Member Regular Contributor nickels's Avatar
    Join Date
    Feb 2000
    Location
    Colorado
    Posts
    284

    Re: how to read a jpg image?

    1) Use photoshop to convert it to a .bmp
    2) Load it using less complicated .bmp software.

    (This is what I do. You may not be able to)

  10. #10
    Member Contributor
    Join Date
    Dec 2001
    Posts
    91

    Re: how to read a jpg image?

    You can try
    http://www.gametutorials.com/Tutoria...OpenGL_Pg1.htm

    I saw this on the current news page at this site today.

    enjoy,
    jpummill

Similar Threads

  1. Unittesting Image Read an write
    By clint3112 in forum OpenCL
    Replies: 1
    Last Post: 02-09-2013, 08:21 AM
  2. Read Image via OpenCL commands
    By GPUworker in forum OpenCL
    Replies: 7
    Last Post: 07-10-2012, 10:46 AM
  3. read gray image and color index image.
    By yjh1982 in forum OpenGL: Advanced Coding
    Replies: 5
    Last Post: 08-21-2010, 04:09 AM
  4. Want to read pixels of 3D image into array
    By glenc in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 05-16-2005, 06:40 PM
  5. Programmatical read of the finished image
    By Andrew Polar in forum OpenGL: Windows
    Replies: 2
    Last Post: 11-16-2004, 01:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean