relax_lib v0.1.0 RelaxLib.ImageMagick

Summary

Functions

Makes a copy of original image

Creates or saves image

Extends the image to the specified dimensions

Converts the image to the image format you specify

Sets the gravity of the image

Opens image source

Resizes the image with provided geometry

Resize the image to fit within the specified dimensions while retaining the aspect ratio of the original image. If necessary, crop the image in the larger dimension

Resize the image to fit within the specified dimensions while retaining the original aspect ratio. Will only resize the image if it is larger than the specified dimensions. The resulting image may be shorter or narrower than specified in the smaller dimension but will not be larger than the specified values

Saves modified image

Provides detailed information about the image

Functions

auto_orient(image)
canvas(image, color)
copy(image)

Makes a copy of original image

create(image, opts \\ [])

Creates or saves image

Uses the convert command, which accepts both existing images, or image operators. If you have an existing image, prefer save/2.

Options

  • :path - The output path of the image. Defaults to a temporary file.
  • :in_place - Overwrite the original image, ignoring :path option. Default false.
custom(image, action, options \\ nil)
extent(image, params)

Extends the image to the specified dimensions

format(image, format)

Converts the image to the image format you specify

gravity(image, params)

Sets the gravity of the image

image_operator(image, operator)
open(path)

Opens image source

resize(image, params)

Resizes the image with provided geometry

resize_to_fill(image, params)

Resize the image to fit within the specified dimensions while retaining the aspect ratio of the original image. If necessary, crop the image in the larger dimension.

resize_to_limit(image, params)

Resize the image to fit within the specified dimensions while retaining the original aspect ratio. Will only resize the image if it is larger than the specified dimensions. The resulting image may be shorter or narrower than specified in the smaller dimension but will not be larger than the specified values.

save(image, opts \\ [])

Saves modified image

Options

  • :path - The output path of the image. Defaults to a temporary file.
  • :in_place - Overwrite the original image, ignoring :path option. Default false.
temporary_path_for(image)
verbose(image)

Provides detailed information about the image