title: How to convert yuy2 to a BITMAP in C++
body: <p>I'm using a security camera DLL to retreive the image from the camera. The DLL call a function of my program passing the image buffer as a parameter, but the image is in yuy2 format. I need to convert this buffer to RGB, but I tried every formula I found on Internet with no success. Every example I tried (including <a href="http://msdn.microsoft.com/en-us/library/aa904813(VS.80).aspx#yuvformats_2" rel="noreferrer">http://msdn.microsoft.com/en-us/library/aa904813(VS.80).aspx#yuvformats_2</a>) gives me wrong colors. </p>
  
  <p>I'm able to convert the buffer to a BW image using only the Y component of the pixel, but I really need the color picture. I debugged (assembly only) the DLL that shows the image in the screen and it uses DirectDraw to do this.</p>