# `Linocut.Resample`
[🔗](https://github.com/jaman/cauldron/blob/v0.2.2/linocut/lib/linocut/resample.ex#L1)

A picture redrawn at another size.

    Linocut.Resample.to(raster, {320, 180})
    Linocut.Resample.to(raster, {320, 180}, mode: :nearest)

`:area` averages the source pixels each target pixel covers, weighted by their alpha, so
a shrunk picture keeps its edges where they were. `:nearest` takes the one source pixel
at the middle of that area, which keeps hard pixel art hard.

# `mode`

```elixir
@type mode() :: :area | :nearest
```

# `to`

```elixir
@spec to(FrenchCurve.Raster.t(), {pos_integer(), pos_integer()}, keyword()) ::
  FrenchCurve.Raster.t()
```

`raster` at `{width, height}`.

## Options

  * `:mode` — `:area` or `:nearest`. Default `:area`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
