class

ImageProcessing::MiniMagick::Processor

Inherits ImageProcessing::Processor < Reference < Object

Constants

SHARPEN_PARAMETERS = {"radius" => 0, "sigma" => 1}

Default sharpening parameters used on generated thumbnails.

Constructors

new(accumulator : BlockArg)
Source

Class methods

load_image(source : BlockArg, loader : Hash(String, OptValue)) : ::MiniMagick::Tool

Initializes the image on disk into a MiniMagick::Tool object. Accepts additional options related to loading the image (e.g. geometry). Additionally auto-orients the image to be upright.

Source
save_image(magick : ::MiniMagick::Tool, destination_path : String, saver : Hash(String, OptValue)) : Nil

Calls the built ImageMagick command to perform processing and save the result to disk. Accepts additional options related to saving the image (e.g. quality).

Source

Instance methods

append(args : Array(OptValue), options : Hash(String, OptValue) = {} of String => OptValue) : ::MiniMagick::Tool

Appends a raw ImageMagick command-line argument to the command.

Source
composite(args : Array(OptValue), options : Hash(String, OptValue) = {} of String => OptValue) : ::MiniMagick::Tool

Overlays the specified image over the current one. Supports specifying an additional mask, composite mode, direction or offset of the overlay image.

Source
composite_with_block(args : Array(OptValue), options : Hash(String, OptValue), &block : Proc(::MiniMagick::Tool, ::MiniMagick::Tool | Nil)) : ::MiniMagick::Tool
Source
crop(args : Array(OptValue), options : Hash(String, OptValue) = {} of String => OptValue) : ::MiniMagick::Tool

Crops the image with the specified crop points.

Source
define(args : Array(OptValue), call_options : Hash(String, OptValue) = {} of String => OptValue) : ::MiniMagick::Tool

Defines settings from the provided hash or string.

Source
limits(args : Array(OptValue), call_options : Hash(String, OptValue) = {} of String => OptValue) : ::MiniMagick::Tool

Specifies resource limits from the provided hash.

Source
resize_and_pad(args : Array(OptValue), options : Hash(String, OptValue) = {} of String => OptValue) : ::MiniMagick::Tool

Resizes the image to fit within the specified dimensions and fills the remaining area with the specified background color.

Source
resize_to_cover(args : Array(OptValue), options : Hash(String, OptValue) = {} of String => OptValue) : ::MiniMagick::Tool

Resizes the image to cover the specified dimensions, without cropping the excess.

Source
resize_to_fill(args : Array(OptValue), options : Hash(String, OptValue) = {} of String => OptValue) : ::MiniMagick::Tool

Resizes the image to fill the specified dimensions, applying any necessary cropping.

Source
resize_to_fit(args : Array(OptValue), options : Hash(String, OptValue) = {} of String => OptValue) : ::MiniMagick::Tool

Resizes the image to fit within the specified dimensions.

Source
resize_to_limit(args : Array(OptValue), options : Hash(String, OptValue) = {} of String => OptValue) : ::MiniMagick::Tool

Resizes the image to not be larger than the specified dimensions.

Source
rotate(args : Array(OptValue), options : Hash(String, OptValue) = {} of String => OptValue) : ::MiniMagick::Tool

Rotates the image by an arbitrary angle. For angles that are not multiple of 90 degrees an optional background color can be specified to fill in the gaps.

Source

Nested types