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?
pixel to file
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: pixel to file
You can do that in IM:Elmit wrote:How can I convert the color depth to only one value of RGB?
Code: Select all
convert in.png -posterize 2 out.png
snibgo's IM pages: im.snibgo.com
Re: pixel to file
Code: Select all
convert rose: -depth 1 -compress none rose.ppm
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: pixel to file
Brilliant. Why didn't I think of that? I'll get the hang of IM one day ...glenrp wrote:convert rose: -depth 1 -compress none rose.ppm
snibgo's IM pages: im.snibgo.com