<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On May 30, 2012, at 8:02 PM, ashika umanga wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="gmail_quote"><blockquote style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid; position: static; z-index: auto; " class="gmail_quote"><p><br>  for(y=0;y<encoder.getVideoParams().height ;y++){   <br>

       for(x=0;x< encoder.getVideoParams().width;x++){</p><p><br>   targetFrame->data0[index][(y* width)+x]=(x%255); //R  <br>   targetFrame->data0[index][(y* width)+x+1]=0;     //G<br>   targetFrame->data0[index][(y* width)+x+2]=0;     //B<br>

   <br>   <br>  }<br>   }<br></p>
</blockquote></div></blockquote></div>You're drawing a greyscale image, that's why. I think you mean to be doing X =  X + 3, so you jump pixels. You're actually setting every single byte, then setting the next two bytes, then overwriting them.<div><br></div><div>I don't know about the pixel/byte layout of RGB24, by the way. But that mistake seems clear.</div><div><br></div><div>BRuce</div></body></html>