Results 1 to 2 of 2

Thread: Display .ppm as gray scale image

  1. #1
    Junior Member Newbie
    Join Date
    Nov 2009
    Posts
    2

    Display .ppm as gray scale image

    I'm new to OpenGL and have been using GLUT in Visual C++ 2008 to code in it for a little more than a week now. I have found and used a .ppm uploader to get a .ppm image and display it on the screen. My question is, how do I display it as a gray scale image? I'm required to "average the three RGB values for every pixel" in order to do it, but I have no clue how to do that!

    I'll be grateful for your time and help! Thanks!

  2. #2
    Junior Member Newbie
    Join Date
    Nov 2009
    Posts
    2

    Re: Display .ppm as gray scale image

    Now, all I need to know is how to find out and change the RGB value of any pixel in the image. Please help me, thanks!

Similar Threads

  1. how to efficiently upload gray scale 16 bit texture?
    By liuyuanpotato in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 11-20-2018, 10:48 PM
  2. read gray image and color index image.
    By yjh1982 in forum OpenGL: Advanced Coding
    Replies: 5
    Last Post: 08-21-2010, 04:09 AM
  3. glColorTableExt for gray scale palette
    By imported_zvivered in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 06-16-2002, 02:25 PM
  4. glColorTable for Gray scale palette
    By imported_zvivered in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 06-15-2002, 08:56 AM
  5. Replies: 1
    Last Post: 02-06-2001, 07:16 AM

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