I have a small C based camera app on Linux with a built-in microhttpd webserver that provides captured jpegs to webclients.
That works well, as the camera does jpg encoding, but as a further option, I need to alter image pixels at server side. So over another camera interface I get the 3 channel rbg image buffer and the question is, which image format do I need in order to display that pixeldata as an image in HTML using e.g.
<img src="/pixeldata"/>
? I prefer not to use an overbloated image lib to create a png or similar, so my 1st idea was to use
Content-Type: image/rgb
, which is the SGI rgb image format, but as I found out, it adds a 512! byte header just to essentially tell image width, height, number of channels... So my challenge is:
- how to wrap the raw pixel data into a simple image header
- preferably in plain C, without adding a large image lib to my camera project
- to make it displayable in HTML on firefox, crome, ie ..
Thanks