Question

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?

Was it helpful?

Solution

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).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top