Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


applying new color data to a texture from a palettized bitmap?

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

Can anyone come up with a good solution to this problem: i have a dx9 texture in the format A1R5G5B5 i have a palette entry with 256 colors in the format A8R8G8B8 and i also have the color indexed bitmap data from an 8 bit bitmap. i have created a texture using the D3DXCreateTextureFromFileEx() and added the palette to the texture. This works fine. Now i want to change my palette to for example a grayscale palette and map it over the texture, and here comes the problems. Supposly i could loop through my bitmap data, look up the color index in my new palette and create the correct 1555 color format and write it directly down in the texture, but since the texture automatically has size power of 2 it does not match my original bitmap size and it screws up. Does any one have a good solution for this ? Thanks in advance. Niels

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!