plate-engine - v0.1.0
    Preparing search index...

    Function fitTo

    • Fit a cell buffer into a width × height frame by nearest-neighbour resampling. cover fills the frame and crops; contain letterboxes with fill.

      Type Parameters

      Parameters

      • src: Grid<T>
      • width: number
      • height: number
      • mode: "cover" | "contain"
      • fill: number = 0

      Returns Grid<T>