View Source Image.Options.Crop (image v0.2.0)

Options and option validation for Image.crop/5.

Link to this section Summary

Types

Indicates how to determine where to crop an image to fill a target area.

Options applicable to cropping an image.

Link to this section Types

@type crop_focus() :: :none | :center | :entropy | :attention | :low | :high

Indicates how to determine where to crop an image to fill a target area.

  • :none means the image will be reduced to fit the required bounding box and no cropping will occur.

  • :center means crop from the center of the image. The central part of the image will be returned, cropped to fill the bounding box.

  • :entropy uses an entropy measure.

  • :attention means crop the image by looking for features likely to draw human attention.

  • :low means position the crop towards the low coordinate. This means the bottom part of the image remains after the crop.

  • :high means position the crop towards the high coordinate. This means the top part of the image remains after the crop.

@type crop_options() :: []

Options applicable to cropping an image.

Currently there are no options.

Link to this section Functions

Link to this function

validate_option(other, options)

View Source
Link to this function

validate_options(options)

View Source