|
LibTIFF 4.7.2
TIFF library public API and implementation reference
|
Stage and transfer WebP RGB or RGBA frames.
The WebP frame codec group covers every callback, state member and pseudo-tag. Contiguous eight-bit unsigned RGB/RGBA is the intended input; ABI support controls four-channel and exact-lossless features. The decoder setup predicate is weaker than a full bit-depth/format validation, so those preconditions remain explicit. Frame dimensions are limited to 16383 each.
Encoding rejects separate PlanarConfig and fails when encoder setup fails. It stages a complete strile and compresses only at postencode. Supply all frame bytes; postencode clears any unwritten staging tail to zero rather than reject it. Encode callbacks diagnose and fail when the state was not initialised for encoding. The dependency writer requires enough raw capacity for the complete encoded frame and does not stream-flush fragments.
Whole-strile decoding can borrow caller output as dependency external memory. Success deletes that decoder; an error can leave the pointer retained until predecode or cleanup. Partial reads use codec-owned full-frame staging. Most errors clear output and latch same-strile failure; fractional-row usage errors permit recovery without that latch. Cleanup releases picture/decoder/staging without finishing or flushing an outstanding frame.