[android-developers] Re: Pls help required ! : setPreviewCallBack - Bitmap

2009-12-02 Thread Garfield
On 1.5 and 1.6, there is no way to know supported preview sizes so apps should not call setPreviewSize. Apps should call getPreviewSize to know the current preview size. On 2.0, Apps should call getSupportedPreviewSizes before setPreviewSize. It's the same for setPictureFormat. On 1.5 and 1.6,

[android-developers] Re: Pls help required ! : setPreviewCallBack - Bitmap

2009-12-01 Thread Jarcikon
Arnouf, I can't help you with that exact problem, but I have an app that does something very similar (What Color). If you look a little deeper into the decodeYUV function, you will see that it is returning ARGB values in an array. Therefore, you do not really need to convert the image to a

[android-developers] Re: Pls help required ! : setPreviewCallBack - Bitmap

2009-12-01 Thread Jarcikon
Arnouf, After reading a little more, I realized what may be causing your original problem, if you still intend to do it that way. The setPreviewSize method does not seem to work, at least on the G1 and MyTouch3G. So in your decodeYUV function you are assuming the data returned will be 50*50