Answer the question
In order to leave comments, you need to log in
How to convert RAW pixels to image?
I tried to gain experience in working with hex and writing an unpacker.
Almost everyone won but faced such a problem, the developers of the game packed all the textures in their raw form without headers.
Ultimately, I have the exact resolution of the textures, the estimated color, and a set of bytes with pixels. The pixels themselves are stored in an array of bytes. I wanted to display them on the form, and here it's just a trick in jav, I can't figure out how to convert these bytes into pixels with normal color.
I suppose that it should be something like this:
1) Create an object that is a picture with such a resolution and color.
2) Give an array of bytes to this picture, specifying the color palette.
Or will you have to manually parse the entire array, write a palette converter and manually create some output format (png for example)?
Tell me or send a book to the article where a similar problem was solved. It seems that I don’t need it, but it’s very interesting =)
If anyone is interested in seeing the excavations of the format, you can look here , there is also a template for the 010 editor and my unpacker (sorry for handwriting).
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question