# `Image.Options.Open`
[🔗](https://github.com/elixir-image/image/blob/v0.65.0/lib/image/options/open.ex#L1)

Options and option validation for `Image.open/2`.

# `fail_on`

```elixir
@type fail_on() :: :none | :truncated | :error | :warning
```

Stop attempting to load an image file
when a level of error is detected.
The default is `:none`.

Each error state implies all the states
before it such that `:error` implies
also `:truncated`.

# `file_access`

```elixir
@type file_access() :: :sequential | :random
```

The file access mode when opening
image files. The default in `:sequential`.

# `gif_open_options`

```elixir
@type gif_open_options() :: [
  access: file_access(),
  fail_on: fail_on(),
  pages: pages(),
  page: 0..100_000
]
```

# `image_open_options`

```elixir
@type image_open_options() ::
  jpeg_open_options()
  | png_open_options()
  | tiff_open_options()
  | webp_open_options()
  | gif_open_options()
  | other_open_options()
```

The options applicable to opening an
image.

# `jpeg_open_options`

```elixir
@type jpeg_open_options() :: [
  shrink: 1..16,
  access: file_access(),
  fail_on: fail_on()
]
```

# `other_open_options`

```elixir
@type other_open_options() :: [access: file_access(), fail_on: fail_on()]
```

# `pages`

```elixir
@type pages() :: pos_integer() | -1 | :all
```

The number of pages to open. Either
a positive integer or one of `-1` or `:all`
meaning all pages.

# `png_open_options`

```elixir
@type png_open_options() :: [access: file_access(), fail_on: fail_on()]
```

# `tiff_open_options`

```elixir
@type tiff_open_options() :: [
  access: file_access(),
  fail_on: fail_on(),
  pages: pages(),
  page: 1..100_000
]
```

# `webp_open_options`

```elixir
@type webp_open_options() :: [
  access: file_access(),
  fail_on: fail_on(),
  pages: pages(),
  page: 0..100_000,
  scale: non_neg_integer() | float()
]
```

# `validate_option`

# `validate_options`

---

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