title: writing to IplImage imageData
body: <p>I want to write data directly into the imageData array of an IplImage, but I can't find a lot of information on how it's formatted. One thing that's particularly troubling me is that, despite creating an image with three channels, there are four bytes to each pixel.</p>
  
  <p>The function I'm using to create the image is:</p>
  
  <pre><code>IplImage *frame = cvCreateImage(cvSize(1, 1), IPL_DEPTH_8U, 3);
  </code></pre>
  
  <p>By all indications, this should create a three channel RGB image, but that doesn't seem to be the case.</p>
  
  <p>How would I, for example, write a single red pixel to that image?</p>
  
  <p>Thanks for any help, it's get me stumped.</p>