• Advertisement
Sign in to follow this  

[.net] Reading an 8bit texture with palette through graphics stream

This topic is 4071 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, I wondering if there is an easy way to read an 8bit texture with its palette through a graphics stream like you do with dxt1 textures, like the code below?
gs = textures[i].TextureImage.LockRectangle(0, LockFlags.Discard);
chunk = br.ReadBytes(Convert.ToInt32(whereYouShouldBe - br.BaseStream.Position));
gs.Write(chunk);
textures[i].TextureImage.UnlockRectangle(0);

Thanks for any help, -Dave

Share this post


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

  • Advertisement