Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Add byte streaming capability for the camera #900

Closed
wants to merge 7 commits into from

Conversation

bparrishMines
Copy link
Contributor

No description provided.

ImageReader.newInstance(
captureSize.getWidth(), captureSize.getHeight(), ImageFormat.JPEG, 2);
byteImageReader =
ImageReader.newInstance(
previewSize.getWidth(), previewSize.getHeight(), ImageFormat.YUV_420_888, 2);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use ImageFormat.YUV_420_888 because it is commonly supported on Android devices.

Image img = reader.acquireLatestImage();
if (img == null) return;

eventSink.success(YUV_420_888toNV21(img));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conversion to NV21 to turn planar image bytebuffer to a single dimension image.

@bparrishMines
Copy link
Contributor Author

Closed for improved version #965

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

Successfully merging this pull request may close these issues.

2 participants