Manually set buffer was too small! Android Camera takePicture is using Previews small buffer

asked 2013-05-24 01:19:36 -0500

atasoyh gravatar image

updated 2013-05-24 06:14:27 -0500

I am developing a project using OPENCV. I have some process on onCameraFrame. While it shows previews, user can take a photo. But in some devices, I take an error after called takePicture(...) method. I set manually picture and preview sizes, picture is bigger than preview. What should I do?

E/Camera-JNI(11783): Manually set buffer was too small! Expected 539380 bytes, but got 460800!

This buffer's size is my frame size, 460800. I logged frame size at onCameraFrame . Every frame's sizes are 460800. As far as I understand, takePicture tries to use previews buffer. And theirs sizes are different.

edit retag flag offensive close merge delete