Skip to content
pubscout

convert_native_img_stream

0.0.1, released 3 years ago by an unverified publisher

Convert native camera stream image formats like nv21 or bgra8888 into jpeg files or bytes.

$ flutter pub add convert_native_img_stream
Source repository

What it does

Provides a utility to convert single plane native image formats from camera streams (such as ImageFormatGroup.nv21 or ImageFormatGroup.bgra8888) into JPEG files or memory bytes. Useful when processing camera frames with ML Kit or similar libraries and saving the exact frame.

AI-written summary of version 0.0.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to save or convert camera stream frames (nv21 or bgra8888) into JPEG format
  • You are processing camera frames with ML Kit and want to capture the processed frame

Skip it when

  • You are not working with camera stream images or native formats
  • You need complex video recording or streaming functionality

Strengths

  • Simple utility specifically targeting camera stream native formats
  • Supports converting directly to memory bytes or files

Weaknesses

  • Very early version (0.0.1) with minimal documentation and a TODO changelog
  • Limited to specific image format groups

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
2

not documented

final convertNative = ConvertNativeImgStream();
final jpegByte = await convertNative.convertImgToBytes(frame.planes.first.bytes, frame.width, frame.height);
final jpegFile = await convertNative.convertImg(frame.planes.first.bytes, frame.width, frame.height, "/path/to/save");

Alternatives

Packages that do the same job and could replace convert_native_img_stream.

Works with

Packages commonly used together with convert_native_img_stream: ones it builds on, ones built on it, and its own family.