pixel to file
Posted: 2014-01-10T13:25:59-07:00
It is not an IM question, but I hope that somebody can give me a hint where to start.
I have to create a file for a machine, which is an "image" of 240 x 32 pixels.
The machine reads the pixels in columns from top to bottom
(For this I think to turn a picture by 90 degree and flip it, then the pixel order left to right and top to bottom will be converted to top to bottom and left to right)
The pixel has only 3 bits !!! for RGB (000, 001, 010, 011, 100, 101, 110, 111)
The resulting file includes ONLY the pixels (binary).
I need to create/display this file on a web page first and then convert it to the above structure.
Which image format would be closest to that task? (bmp ?)
I looked at the bmp description and wonder if I could just cut off the headers.
How can I convert the color depth to only one value of RGB?
I have to create a file for a machine, which is an "image" of 240 x 32 pixels.
The machine reads the pixels in columns from top to bottom
(For this I think to turn a picture by 90 degree and flip it, then the pixel order left to right and top to bottom will be converted to top to bottom and left to right)
The pixel has only 3 bits !!! for RGB (000, 001, 010, 011, 100, 101, 110, 111)
The resulting file includes ONLY the pixels (binary).
I need to create/display this file on a web page first and then convert it to the above structure.
Which image format would be closest to that task? (bmp ?)
I looked at the bmp description and wonder if I could just cut off the headers.
How can I convert the color depth to only one value of RGB?