Loading raw texture
Hello,
I have a volume texture in the raw format. I want to load and edit it, but have no idea how?
What is to do, that I get a normal texture (with header) out of it.
_______________
Thanks, Jürgen.
Wrong forum, you probably want Game Programming (Ask a mod to move the topic rather than re-posting though).
What format is the raw texture in? What do you mean by a "normal texture"? And what do you mean by "with header"? Textures don't have headers, they're just chunks of raw data.
And what graphics API are you using? Direct3D? OpenGL? Something else?
What format is the raw texture in? What do you mean by a "normal texture"? And what do you mean by "with header"? Textures don't have headers, they're just chunks of raw data.
And what graphics API are you using? Direct3D? OpenGL? Something else?
Oh, I'm sorry. I don't know, which format it is. I have only the raw file, with the informations, that it is 256 x 256 x 32 pixel and is in rgb colormode.
I mean with "normal texture" and "with header", that I want, to convert the raw file into an usually image format. I need this, because I want to convert these image in a next step into the dds format from microsoft. For this, I use the DevIL, but DevIL can't load raw files directly.
Thanks, Jürgen.
I mean with "normal texture" and "with header", that I want, to convert the raw file into an usually image format. I need this, because I want to convert these image in a next step into the dds format from microsoft. For this, I use the DevIL, but DevIL can't load raw files directly.
Thanks, Jürgen.
If the file size is 256x256x3 bytes, then there is no header in the image file. In this case, just open it and copy the pixel data into your application.
If the file size is larger than 256x256x3 then, skip the difference and load data. (The header is located at the front of the file in general.)
If the file size is larger than 256x256x3 then, skip the difference and load data. (The header is located at the front of the file in general.)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement