Jump to content
  • Advertisement
Sign in to follow this  
more_orangy2000

XYZ coordinates to RGB convertion

This topic is 3819 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

HI Guys, is there any code which actually takes the coordinates of XYZ and then converts into RGB which can be used as the input for writing the TGA file? I am looking at the C code for converting the XYZ coordinates to RGB

Share this post


Link to post
Share on other sites
Advertisement
I think you'll need to give some more information about what you're trying to achieve here. What do these 3D coordinates represent? How should they be saved to an image file? For what purpose?

Share this post


Link to post
Share on other sites
Sorry, what does this even mean? (x, y, z) is, normally, a position in space. (r, g, b) is, normally, a colour. Those are completely unrelated things.

Share this post


Link to post
Share on other sites
Maybe you're talking about the XYZ colorspace ?

If that's the case try googling CIEXYZ
There is a standard matrix formula to convert CIEXYZ to sRGB.
You can get it here : http://en.wikipedia.org/wiki/SRGB

Share this post


Link to post
Share on other sites
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!