I've found a way round what I wanted to do.
I've created a valid bmp header in a graphics program, and ow I just copy that header to a new file and append my data to the end.
I'v limited myself to all combinations of 3 intensities, so that gives me 27 colours, which I just write in ascii, ie if I want a nice royal blue, which is hex code 0x21217E I actually write "~!!" (bmps read as BGR) to the file.
|