Repository navigation
Home
yuv_ffi creates, converts, transforms and displays raw YUV (I420, NV12) and BGRA images in Flutter. It works on decoded
pixels, not on encoded files: native platforms run C code through FFI, and Web runs a WASM backend. These guides give
step-by-step recipes, explain the behavior behind them and list the errors you are most likely to meet. The
README is the quick start, the
API reference lists every parameter, and the
CHANGELOG records what changed in each version.
Documented version: 0.5.2. This wiki describes yuv_ffi 0.5.2; every recipe here was built against that version.
Camera capture is not part of this package. For a live camera preview, frame processing and capture, use
yuv_camera, which builds on yuv_ffi; its guides are in the
yuv_camera wiki.
You want to see a processed image on screen as fast as possible.
- Getting started: add the package, initialize it, create an image, process it and show it.
- Displaying images: choose between a still image and a live stream of frames.
Your app receives decoded frames or pixel buffers, converts and edits them, and shows the latest result.
- Images and layout: formats, planes, strides and when to keep or remove padding.
- Processing and mutations: which calls change an image and which return a new one; crop, rotate, blur and format conversion.
-
Displaying images:
YuvImageWidgetfor one image,YuvFramePresenterandYuvFrameViewfor a stream. - Geometry and overlays: draw boxes and marks that stay aligned with a rotated or mirrored frame.
- Platforms and troubleshooting: per-isolate initialization, platform and Web limits, and fixes for common failures.
| Guide | Use it to |
|---|---|
| Getting started | Get a first image on screen and learn the three rules everything else builds on. |
| Images and layout | Pick a format, build an image from RGBA bytes or from planes, and control strides and padding. |
| Processing and mutations | Crop, rotate, flip, blur and convert images; understand apply* versus returned copies and revision. |
| Displaying images | Show a still image or a stream of frames; understand the shader path, its fallback and dispose. |
| Geometry and overlays | Map points between source, upright and view coordinates; cut out the visible area. |
| Platforms and troubleshooting | Initialize in every isolate, read the platform notes, and fix load, native and Web errors. |
- Migration guide for applications moving from 0.2.4 or the retracted 0.4.0.
- Web parity evidence for the exact cases checked on Web.
- Example app: image loading, transforms, effects and frame display.
- yuv_camera wiki: camera preview, frame processing and capture.