View Source Image.Options.Open (image v0.33.0)

Options and option validation for Image.open/2.

Link to this section Summary

Types

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

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

The options applicable to opening an image.

Link to this section Types

@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.

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

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

The options applicable to opening an image.

@type jpeg_open_options() :: [
  shrink: 1..16,
  autorotate: boolean(),
  access: file_access(),
  fail_on: fail_on()
]
@type other_open_options() :: [access: file_access(), fail_on: fail_on()]
@type png_open_options() :: [access: file_access(), fail_on: fail_on()]
@type tiff_open_options() :: [
  autorotate: boolean(),
  access: file_access(),
  fail_on: fail_on(),
  pages: number(),
  page: 1..100_000
]
@type webp_open_options() :: [
  autorotate: boolean(),
  access: file_access(),
  fail_on: fail_on(),
  pages: number(),
  page: 0..100_000,
  scale: non_neg_integer() | float()
]

Link to this section Functions

Link to this function

validate_option(option, options)

View Source
Link to this function

validate_options(options)

View Source