Archived

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

RapidStunna

-> Converting color formats?

Recommended Posts

After loading images up in my game, they are all in different color formats (16 bit, 24 bit, or 32 bit). Depending on the format of the back buffer (also either 16, 24, or 32 bit) their pixels each need to be converted to the back buffer''s format. So far here''s what I''ve figured out: 24-32 bit - add full alpha 32-24 bit - lose alpha Anything involving 16bit color is confusing me. I understand how it is setup but converting it to a full 24 or 32 and visa versa I can''t really make sense of. Also, is it possible to have a single operation to convert the pixels given the channels (3 = 24, 2=16, 4=32) or something similar? The reason I ask this also is because it seems a little slow having to check up each current bpp and it''s resulting bpp before figuring how to modify the pixel. An explanation, source, link, etc would be greatly appreciated. ---
Brent Gunning | My Site

Share this post


Link to post
Share on other sites