Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stock snapshot/image byte array #74

Closed
VyacheslavShmakin opened this issue Oct 25, 2017 · 2 comments
Closed

Stock snapshot/image byte array #74

VyacheslavShmakin opened this issue Oct 25, 2017 · 2 comments

Comments

@VyacheslavShmakin
Copy link

Could you please add some functionality to provide return stock byte array from snapshot/image?
I think it would be much better if user will have ability decide what to do with this byte array.
It may be some kind of option.
Like captureImage(boolean processImage) and captureSnapshot(boolean processImage)

@natario1
Copy link
Owner

What's the use case for this? You can set cropOutput to false and that's it.

I think you might be satisfied with a frame processor #48

@VyacheslavShmakin
Copy link
Author

VyacheslavShmakin commented Oct 25, 2017

Oh. It seems I missed #48. But there is some details.
There is some modifications for byte array received from taken frame in Camera1 class.
final boolean consistentWithView = (sensorToDevice + sensorToDisplay + 180) % 180 == 0; byte[] rotatedData = RotationHelper.rotate(data, preWidth, preHeight, sensorToDevice); YuvImage yuv = new YuvImage(rotatedData, format, postWidth, postHeight, null); mCameraCallbacks.processSnapshot(yuv, consistentWithView, exifFlip);

So, I think it would be nice to have original byte array as additional parameter.
By the way, thank you for this great library:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants