문제

This question may be slightly philosophical in nature, but would it be crazy to just capture a photo from the live preview instead of going through takePhoto?

I've found a few examples of how to do so: How to capture preview image frames from Camera Application in Android Programming? and Capture an image from the camera preview.

Right now I'm juggling through inconsistent different EXIF rotation behavior on various phones (it looks like you have a FullExifFixup for all Samsung devices, but I'm having different behavior between my S2 and S4) and I'm wondering if it wouldn't just be easier to grab the preview image.

Is this a stupid idea?

도움이 되었습니까?

해결책

but would it be crazy to just capture a photo from the live preview instead of going through takePhoto?

It would be crazy with the library as it stands, simply because I don't expose the preview frames. :-) That's on the issue list.

it looks like you have a FullExifFixup for all Samsung devices, but I'm having different behavior between my S2 and S4

I don't have an S2 at the moment. If you can provide me with a reproducible test case (including details of the specific model of S2), post an issue, and I can see what I can do.

I'm wondering if it wouldn't just be easier to grab the preview image

It won't be at full resolution of the camera -- you'll be capped at the preview frame size. That being said, plenty of apps work with just the preview frames. Vine, for example, captures its video by capturing the preview frames, due to various problems they ran into when using MediaRecorder (there's a conference talk from a Vine employee that goes into more details).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top