Skip to main content

compute_weights

Function compute_weights 

Source
pub fn compute_weights(
    filter: KnownFilter,
    src_size: usize,
    dst_size: usize,
) -> Vec<PixelWeights>
Expand description

Compute the exact pixel weight table for a 1D resize operation.

For each output pixel, returns the list of source pixels and their normalized weights. Uses clamp edge handling (repeats the edge pixel for out-of-bounds accesses).