View Source Image.Options.Write (image v0.55.2)

Options and option validation for Image.write/3.

Summary

Types

Options for writing a gif file with Image.write/2.

Allowable compression types for heif images.

Options for writing a heif file with Image.write/2.

Options for writing an image to a file with Image.write/2.

Options for writing a jpeg file with Image.write/2.

Options for writing a png file with Image.write/2.

Options for writing an image stream

Options for writing a tiff file with Image.write/2.

Options for writing a webp file with Image.write/2.

Types

@type gif_write_option() :: {:interframe_maxerror, 0..32} | {:effort, 1..10}

Options for writing a gif file with Image.write/2.

@type heif_compression() :: :hevc | :avc | :jpeg | :av1

Allowable compression types for heif images.

@type heif_write_option() ::
  {:compression, heif_compression()}
  | {:effort, 1..10}
  | {:minimize_file_size, boolean()}

Options for writing a heif file with Image.write/2.

@type image_write_options() :: [
  {:quality, 1..100}
  | {:background, Image.pixel()}
  | stream_write_option()
  | jpeg_write_option()
  | png_write_option()
  | tiff_write_option()
  | webp_write_option()
  | heif_write_option()
  | gif_write_option()
]

Options for writing an image to a file with Image.write/2.

@type jpeg_write_option() ::
  {:strip_metadata, boolean()}
  | {:icc_profile, Path.t()}
  | {:minimize_file_size, boolean()}

Options for writing a jpeg file with Image.write/2.

@type png_write_option() ::
  {:strip_metadata, boolean()}
  | {:icc_profile, Path.t()}
  | {:minimize_file_size, boolean()}
  | {:compression, 1..9}
  | {:effort, 1..10}

Options for writing a png file with Image.write/2.

@type stream_write_option() ::
  {:buffer_size, pos_integer() | :unbuffered} | {:suffix, String.t()}

Options for writing an image stream

@type tiff_write_option() :: {:icc_profile, Path.t()} | {:pyramid, boolean()}

Options for writing a tiff file with Image.write/2.

@type webp_write_option() ::
  {:icc_profile, Path.t()}
  | {:strip_metadata, boolean()}
  | {:minimize_file_size, boolean()}
  | {:effort, 1..10}

Options for writing a webp file with Image.write/2.

Functions

Link to this function

validate_options(options, options)

View Source