Page 1 of 1

Raw streaming

Posted: Mon Jan 02, 2006 12:49 am
by jameswilson
Where can i find out more about this format so i can get zm4ms to support it

Cheers

Posted: Mon Jan 02, 2006 10:50 am
by zoneminder
The format is presented using the mime type 'image/x-rgb' and basically is just a series of bytes representing each pixel in the image as an rgb value. So for a 320x240 image there will be 320x240x3 bytes in order as r1g1b1r2g2b2... etc going in rows top to bottom and from the left to right. There is no format header.

Essentially it's what you'd get if you decompressed a jpeg should also pretty much be ready to map onto a screen.

Phil

Posted: Mon Jan 02, 2006 1:40 pm
by jameswilson
i think the problem is taht i need to know the size of image if using raw due to its streaming type. Once i have a running 1.22 i will give it a try or can you email me a sample file

Posted: Mon Jan 02, 2006 2:09 pm
by zoneminder
There is a content length header which contains the size of the data. I can probably put in an X-Image-Dimensions header which contains the full WxHxD if it helps.

Phil

Posted: Mon Jan 02, 2006 2:17 pm
by jameswilson
it proabably will, In zm4ms .net does all the work all i do is tell it where to gety the images from. If it has no wxhxd then it will fail. Also if it conatianed this info it means i wouldnt need to store it my end in the app as it it could pick it up from the server.

James

Posted: Mon Jan 02, 2006 7:44 pm
by zoneminder
So, is that a yes you would like the header? :lol:

Phil

Posted: Mon Jan 02, 2006 7:46 pm
by jameswilson
yes please but i havnt tried it yet. Im assuming i will have to grab the raw file and then tell the picturebox when to start a new line for the image to be built up. If i can get this from zms then it will be more flexible. Thats assuming i can do it at all mate.

James