Jump to content
  • Advertisement
Sign in to follow this  
schattenmaennlein

OpenGL reading a specific pixel out of a file

This topic is 4003 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i hope i post this in the right forum. I want to read the colorvalue out of pixel x,y of a file(i would prefer tga but bmp is ok also) in runtime. I can think of a couple of uses for this but to name one Im writing a very small texturefontengine and would like to define the spacing between the fonts with specially colored pixels. I have very little clue how image loading exactly works and havent found a good explanation in the net, I handle my textureloading with the free library DevIL. I guess I could parse the files myself(eventhough I wouldnt know how to yet) but Im not sure if this is efficient, i think devil does already do this (and better than I would) and opengl knows the colorvalues since it draws them. So how do you do this? links to tutorials are also welcome. ALSO: if an image is "loaded", what exactly does this mean? If an compressed tga gets loaded into ram, is it still compressed and is it still in the tga format or is it like decoded to something straight forward the graphic card could interpret without further conversion?

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!