Camera Preview to RGB565

Hi,
I'm trying to convert camera preview image (YUV420 format) , that I
receive inside onPreviewFrame event, to RGB565 format. Idea is to do
it after every 20 seconds.
I found the following post regarding YUV420->RGB565 conversion, but it
seems i'm doing soemthing wrong when passing the size of rgb array.

... read more on groups.google.com
None
 
Source: groups.google.com