# `BB.Error.Invalid.Camera.FrameSizeMismatch`
[🔗](https://github.com/beam-bots/bb_camera/blob/main/lib/bb/error/invalid/camera/frame_size_mismatch.ex#L5)

A raw frame's data isn't the size its format and dimensions say it is.

A raw frame carries nothing but pixels, so its format and dimensions are the
only description a consumer has of what is in it. Data of the wrong size
means one of them is wrong - most often a capture tool that padded its rows,
or one that quietly delivered a different size from the one requested - and
a consumer that trusted it would read every pixel from the wrong place. So
the frame is refused rather than built.

# `t`

```elixir
@type t() :: %BB.Error.Invalid.Camera.FrameSizeMismatch{
  __exception__: term(),
  actual: non_neg_integer(),
  bread_crumbs: term(),
  class: term(),
  expected: pos_integer(),
  format: BB.Camera.Format.t(),
  height: pos_integer(),
  path: term(),
  splode: term(),
  stacktrace: term(),
  vars: term(),
  width: pos_integer()
}
```

# `exception`

```elixir
@spec exception(opts :: Keyword.t()) :: %BB.Error.Invalid.Camera.FrameSizeMismatch{
  __exception__: term(),
  actual: term(),
  bread_crumbs: term(),
  class: term(),
  expected: term(),
  format: term(),
  height: term(),
  path: term(),
  splode: term(),
  stacktrace: term(),
  vars: term(),
  width: term()
}
```

Create an `Elixir.BB.Error.Invalid.Camera.FrameSizeMismatch` without raising it.

## Keys

- :format
- :width
- :height
- :expected
- :actual

---

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