Skip to main content

Module orient

Module orient 

Source
Expand description

Physical EXIF orientation baking — rotate / flip any pixel view or buffer.

Supports all 8 dihedral orientations (Identity, FlipH, FlipV, Rotate180, Transpose, Rotate90, Rotate270, Transverse) across all pixel widths (1, 2, 3, 4, 6, 8, 12, 16+ B/px) with SIMD register transposes (pxn_x86, rgb3_x86, pxn_neon, and WASM SIMD128 4×4) under #![forbid(unsafe_code)].

Functions§

apply_orientation
Apply orientation to src, returning a freshly allocated tightly packed PixelBuf.
apply_orientation_banded
Apply explicit orientation to a BandedBuf, returning a freshly allocated BandedBuf partitioned according to sizing with Orientation::Identity metadata and zero full-frame contiguous allocation.
apply_orientation_banded_into
Apply orientation from src into pre-allocated dst BandedBuf with zero heap allocation and full SIMD tile transposes across every (src_band, dst_band) intersection.
apply_orientation_banded_into_with_pulse
Apply orientation from src into pre-allocated dst BandedBuf with optional cooperative cancellation and progress via pulse (pass None when not needed).
apply_orientation_banded_with_pulse
Apply explicit orientation to a BandedBuf with optional cooperative cancellation and progress via pulse (pass None when not needed).
apply_orientation_into
Apply orientation to src, writing into caller-provided dst with zero heap allocation.
apply_orientation_into_with_pulse
Apply orientation to src, writing into caller-provided dst with zero heap allocation and optional cooperative cancellation/progress via pulse (pass None when not needed).
apply_orientation_owned
Apply explicit orientation to an owned PixelBuf, returning buf zero-copy on Orientation::Identity and always emitting Orientation::Identity metadata on the result (matching apply_orientation).
apply_orientation_owned_with_pulse
Apply explicit orientation to an owned PixelBuf with optional cooperative cancellation and row progress via pulse (pass None when not needed).
apply_orientation_with_pulse
Apply orientation to src, returning a freshly allocated tightly packed PixelBuf, with optional cooperative cancellation and row progress via pulse (pass None when not needed).
bake_orientation
Physically bake src.orientation() into pixels, returning a tightly packed PixelBuf with Orientation::Identity.
bake_orientation_banded
Physically bake src.orientation() into a BandedBuf partitioned according to sizing (BandSizing::MaxBandBytes or BandSizing::RowsPerBand) with Orientation::Identity on the result.
bake_orientation_owned
Physically bake buf.orientation() into pixels, returning buf zero-copy when buf.orientation() == Orientation::Identity and clearing the resulting orientation to Orientation::Identity.