title: How can I create a YuvImage in android
body: <p>I need to create a yuv image in NV21 format for testing purpose.</p>
  
  <p>From this posting, <a href="https://stackoverflow.com/questions/9192982/displaying-yuv-image-in-android">Displaying YUV Image in Android</a>, I see it does:</p>
  
  <blockquote>
    <p>YuvImage yuvImage = new YuvImage(data, PictureFormat.NV21, width,
    height, null);</p>
  </blockquote>
  
  <p>How can I get 'data'? to passing in yuvImage?
  Can I load it from a resource file, what should be the resource file format?</p>