Jump to content
  • Advertisement
Sign in to follow this  
vvvaaa

Converting image (w*h*3) into D3DFMT_X8R8G8B8 format

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

Hello, Can anyone help me or guide me convert image array of 640*480*3 into D3DFMT_X8R8G8B8 format? Will the first value of XRGB format include 0 for X, then pixel value corresponding to Red, then pixel value corresponding to Green, and so on Please let me know, thanks regards

Share this post


Link to post
Share on other sites
Advertisement
I think this will help:
Quote:

All formats are listed from left to right, most significant bit (MSB) to least significant bit (LSB). For example, ARGB is ordered from the MSB channel A (alpha) to the LSB channel B (blue). During traversal of surface data, the data is stored in memory from LSB to MSB, which means that the channel order in memory is from LSB (blue) to MSB (alpha).


And nah, I don't have a secret source (!) - type 'format enumeration categories' into the index of DirectX help! [smile]

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!