class

Pixie::Image

Inherits Pixie::Helpers / Reference / Object

Constructors

new(width : Int, height : Int, background_color : Pixel = Pixel::TRANSPARENT)

Creates a new blank image using the given width, height, and background color. The default background color is transparent, and the format is set to PNG.

Example:

image = Image.new(640, 480, Pixel::RED)
Source
new(wand : Pointer(LibMagick::MagickWand))

Creates a new Image from the given LibMagick::MagickWand instance.

Source
new(image : Pointer(LibMagick::Image))

Creates a new Image from the given LibMagick::Image instance.

Source
new(input : String | Bytes | IO)

Creates a new Image from the given stream. See Image#read for more information.

Source
new(images : Array(String) | Array(Bytes) | Array(IO))

Creates a new Image from the given Array, where each element is a layer in the image.

Source
new(image : Image)

Creates a new Image from the given Pixie::Image instance.

Source
new

Creates a new Image with no data. This is the underlying method used by all other constructors.

Source

Class methods

import_pixels(pixels : Iterable(Int), width : Int, height : Int, depth : Int, map : String)

Create an image from a map of pixels.

Example:

image = Image.import_pixels(pixels, 0, 0, 16, "RGB")
Source

Instance methods

==(other : Image)
Source
[](index : Int)

Get the individual image (layer) at the given index.

Example:

image = Image.new("/path/to/image.gif")
image[0] # => Image
Source
[](format : String)

Get image details using special formatting characters. See https://imagemagick.org/script/escape.php

Example:

image = Image.new("/path/to/image.png")
image["%w"] # => "640"
image["%h"] # => "480"
image["%f"] # => "image.png"
Source
adaptive_blur(radius : Float, sigma : Float)

Apply an adaptive blur to the image.

Source
adaptive_resize(width : Int, height : Int, preserve_aspect_ratio : Bool = false)

Apply an adaptive resize to the image.

Source
adaptive_sharpen(radius : Float, sigma : Float)

Apply an adaptive sharpen to the image.

Source
adaptive_threshold(width : Int, height : Int, bias : Float)

Apply an adaptive threshold to the image.

Source
add_image(image : Image)

Add an image to the image set.

Source
add_noise(noise_type : LibMagick::NoiseType, attenuate : Float = 1.0)

Add noise to the image. Valid noise types are:

  • :undefined
  • :uniform
  • :gaussian
  • :multiplicative_gaussian
  • :impulse
  • :laplacian
  • :poisson
  • :random
Source
affine_transform(brush : Brush)
Source
animate(server_name : String = ":0")

Animate the image sequence using the given server name.

Source
annotate(brush : Brush, x : Float, y : Float, angle : Float, text : String)
Source
append(top_to_bottom : Bool = false)

Append all images together into a single image.

Source
auto_gamma

Automatically adjust the gamma level of this image.

Source
auto_level

Automatically adjust the level of this image.

Source
auto_orient

Automatically orient the image based on its EXIF data.

Source
auto_threshold(method : LibMagick::AutoThresholdMethod)

Automatically threshold the image using the given method. Valid methods are:

  • :undefined
  • :kapur
  • :ohtsu
  • :triangle
Source
background_color

Return the background color of the image as a Pixie::Pixel.

Source
black_threshold(threshold : Pixel)

Set the black threshold of the image.

Source
blob

Get the image as a Bytes instance.

Source
blue_primary

Returns the chromaticity blue primary point for the image as an x, y, z tuple.

Source
blue_shift(factor : Float)

Set the blue shift factor of the image.

Source
blur(radius : Float, sigma : Float)

Blur the image using the given radius and sigma.

Source
border(border_color : Pixel, width : Int, height : Int, compose : LibMagick::CompositeOperator = :undefined)

Add a border to the image using the given Pixie::Pixel.

Source
border_color

Return the border color of the image as a Pixie::Pixel.

Source
brightness_contrast(brightness : Float, contrast : Float)

Apply a brightness and contrast adjustment to the image.

Source
bytesize
Source
canny_edge(radius : Float, sigma : Float, lower_percent : Float, upper_percent : Float)

Detect edges in the image using the given radius.

Source
channel_fx(expression : String)

Applies a channel expression to the specified image.

Source
charcoal(radius : Float, sigma : Float)

Apply a charcoal effect to the image using the given radius and sigma.

Source
chop(width : Int, height : Int, x : Int, y : Int)

Removes a region of a canvas and collapses the canvas to occupy the removed portion.

Source
clahe(width : Int, height : Int, number_bins : Float, clip_limit : Float)

a variant of adaptive histogram equalization in which the contrast amplification is limited, so as to reduce this problem standard non-contrast limited AHE.

Source
clamp

Restricts the color range from 0 to the quantum depth.

Source
clear
Source
clip

Clips along the first path from the 8BIM profile, if present.

Source
clip_path(pathname : String, inside : Bool = false)

Clips along the named paths from the 8BIM profile, if present. Later operations take effect inside the path. Id may be a number if preceded with #, to work on a numbered path, e.g., "#1" to use the first path.

Source
clone
Source
clut(clut : Image, method : LibMagick::PixelInterpolateMethod)

Replaces colors in the image from a color lookup table.

Source
coalesce

Composites a set of images while respecting any page offsets and disposal methods. GIF, MIFF, and MNG animation sequences typically start with an image background and each subsequent image varies in size and offset. Returns a new sequence where each image in the sequence is the same size as the first and composited with the next image in the sequence.

Source
collect_unique_colors
Source
color_correct(collection : String)

accepts a lightweight Color Correction Collection (CCC) file which solely contains one or more color corrections and applies the color correction to the image. Here is a sample CCC file:

  <ColorCorrectionCollection xmlns="urn:ASC:CDL:v1.2">
    <ColorCorrection id="cc03345">
      <SOPNode>
        <Slope> 0.9 1.2 0.5 </Slope>
        <Offset> 0.4 -0.5 0.6 </Offset>
        <Power> 1.0 0.8 1.5 </Power>
      </SOPNode>
      <SATNode>
        <Saturation> 0.85 </Saturation>
      </SATNode>
    </ColorCorrection>
  </ColorCorrectionCollection>

which includes the offset, slope, and power for each of the RGB channels as well as the saturation.

Source
color_matrix(matrix : LibMagick::KernelInfo)

Apply color transformation to an image. The method permits saturation changes, hue rotation, luminance to alpha, and various other effects. Although variable-sized transformation matrices can be used, typically one uses a 5x5 matrix for an RGBA image and a 6x6 for CMYKA (or RGBA with offsets). The matrix is similar to those used by Adobe Flash except offsets are in column 6 rather than 5 (in support of CMYKA images) and offsets are normalized (divide Flash offset by 255).

Source
colorize(colorize : Pixel, blend : Pixel)

Blends the fill color with each pixel in the image.

Source
colormap_color(index)
Source
colors
Source
colorspace
Source
combine(colorspace : LibMagick::ColorspaceType)

Combines one or more images into a single image. The grayscale value of the pixels of each image in the sequence is assigned in order to the specified channels of the combined image. The typical ordering would be image 1 => Red, 2 => Green, 3 => Blue, etc.

Source
comment(comment : String)

Adds a comment to your image.

Source
compare(reference : Image, metric : LibMagick::MetricType, distortion : Float)

Compares an image to a reconstructed image and returns the specified difference image.

Source
compare_layers(method : LibMagick::LayerMethod)

Compares each image with the next in a sequence and returns the maximum bounding region of any pixel differences it discovers.

Source
complex(op : LibMagick::ComplexOperator)

Performs complex mathematics on an image sequence using the given oprtator. Valid operators are:

  • :undefined
  • :add
  • :conjugate
  • :divide
  • :magnitude_phase
  • :multiply
  • :real_imaginary
  • :subtract
Source
composite(source : Image, operator : LibMagick::CompositeOperator, clip_to_self : Bool, x : Int, y : Int)

Composites two images together using the given operator. See Image#complex for a list of valid operators.

Source
composite(source : Image, compose : LibMagick::CompositeOperator, gravity : LibMagick::GravityType)

Composites two images together using the given operator and gravity. See Image#complex for a list of valid operators. Valid gravities are:

  • :undefined
  • :forget
  • :north_west
  • :north
  • :north_east
  • :west
  • :center
  • :east
  • :south_west
  • :south
  • :south_east
  • :static
Source
composite_layers(source : Image, compose : LibMagick::CompositeOperator, x : Int, y : Int)

Composite the images in the source wand over the images in the destination wand in sequence, starting with the current image in both lists. Each layer from the two image lists are composted together until the end of one of the image lists is reached. The offset of each composition is also adjusted to match the virtual canvas offsets of each layer. As such the given offset is relative to the virtual canvas, and not the actual image. Composition uses given x and y offsets, as the 'origin' location of the source images virtual canvas (not the real image) allowing you to compose a list of 'layer images' into the destination images. This makes it well suitable for directly composing 'Clears Frame Animations' or 'Coalesced Animations' onto a static or other 'Coalesced Animation' destination image list. GIF disposal handling is not looked at.

Special case:- If one of the image sequences is the last image (just a single image remaining), that image is repeatedly composed with all the images in the other image list. Either the source or destination lists may be the single image, for this situation. In the case of a single destination image (or last image given), that image will be cloned to match the number of images remaining in the source image list. This is equivalent to the "-layer Composite" Shell API operator.

For a list of valid operators, see Image#complex.

Source
composite_operator
Source
compression
Source
compression_quality
Source
connected_components(connectivity : Int)

Returns the connected-components of the image uniquely labeled. The returned connected components image colors member defines the number of unique objects. Choose from 4 or 8-way connectivity.

Source
constitute(columns : Int, rows : Int, map : String, storage : LibMagick::StorageType, pixels : Array(U)) forall U

Adds an image to the wand comprised of the pixel data you supply. The pixel data must be in scanline order top-to-bottom. The data can be char, short int, int, float, or double. Float and double require the pixels to be normalized [0..1], otherwise [0..Max], where Max is the maximum value the type can accomodate (e.g. 255 for char).

For example, to create a 640x480 image from unsigned red-green-blue character data:

image = Image.new
data = Array(UInt8).new(640 * 480 * 3) { 0u8 }
image.constitute(640, 480, "RGB", :char, data)
Source
contrast(sharpen : Bool)

Enhances the intensity differences between the lighter and darker elements of the image. Set sharpen to a value other than 0 to increase the image contrast otherwise the contrast is reduced.

Source
contrast_stretch(black_point : Float, white_point : Float)

Enhances the contrast of a color image by adjusting the pixels color to span the entire range of colors available. You can also reduce the influence of a particular channel with a gamma value of 0.

Source
convolve(kernel : LibMagick::KernelInfo)

Applies a custom convolution kernel to the image.

Source
crop(width : Int, height : Int, x : Int, y : Int)

Extracts a region of the image.

Source
cycle_colormap(displace : Int)

Displaces an image's colormap by a given number of positions. If you cycle the colormap a number of times you can produce a psychodelic effect.

Source
decipher(passphrase : String)

Converts cipher pixels to plain pixels.

Source
deconstruct

Compares each image with the next in a sequence and returns the maximum bounding region of any pixel differences it discovers.

Source
delay
Source
delete_property(name : String)

Delete a specific property of the image.

Example:

image = Image.new("/path/to/image.png")
image.delete_property("exif:GPSLatitude")
Source
depth
Source
deskew(threshold : Float)

Removes skew from the image. Skew is an artifact that occurs in scanned images because of the camera being misaligned, imperfections in the scanning or surface, or simply because the paper was not placed completely flat when scanned.

Source
despeckle

Reduces the speckle noise in an image while perserving the edges of the original image.

Source
display(x_server : String = ":0")

Displays an image using the given X server.

Source
displays(x_server : String = ":0")

Displays an image sequence using the given X server.

Source
dispose
Source
distort(method : LibMagick::DistortMethod, args : Array(Float64), best_fit : Bool = false)

Distorts an image using various distortion methods, by mapping color lookups of the source image to a new destination image usally of the same size as the source image, unless best_fit is set to true.

Valid distortion methods are:

  • :undefined
  • :affine
  • :affine_projection
  • :scale_rotate_translate
  • :perspective
  • :perspective_projection
  • :bilinear_forward
  • :bilinear_reverse
  • :polynomial
  • :arc
  • :polar
  • :de_polar
  • :cylinder2plane
  • :plane2cylinder
  • :barrel
  • :barrel_inverse
  • :shepards
  • :resize
  • :sentinel

Example:

image = Image.new("/path/to/image.png")
image.distort(:affine, [0.0, 0.0, 0.0, 0.0, 0.0, 0.0])
Source
distortion(reference : Wand, metric : LibMagick::MetricType)
Source
distortions(reference : Wand, metric : LibMagick::MetricType, channel : LibMagick::ChannelType)
Source
draw(brush : Brush)
Source
draw
Source
edge(radius : Float = 0.0)

Enhances edges within the image with a convolution filter of the given radius. Using a radius of 0 will select a suitable radius for you.

Source
emboss(radius : Float = 0.0, sigma : Float = 0.0)

Enhance edges within the image with a convolution filter of the given radius and sigma. Using a radius of 0 will select a suitable radius for you.

Source
encipher(passphrase : String)
Source
endian
Source
enhance
Source
enhance_local_contrast(radius : Float64, strength : Float64)
Source
equalize
Source
evaluate(operator : LibMagick::MagickEvaluateOperator, value : Float)
Source
evaluate(operator : LibMagick::MagickEvaluateOperator)
Source
exif

Return EXIF data for the image as a Hash(String, String).

Source
extent(width : Int, height : Int, x : Int, y : Int)

Extend the image as defined by the geometry, gravity, and wand background color. Set the (x,y) offset of the geometry to move the original wand relative to the extended wand.

Source
features(distance)
Source
filename
Source
finalize
Source
flip
Source
flood_fill_paint(fill : Pixel, fuzz : Float, border_color : Pixel, x : Int, y : Int, invert : Bool = false)
Source
flop
Source
format
Source
forward_fourier_transform(magnitude : Float)
Source
frame(matte_color : Pixel, width : Int, height : Int, inner_bevel : Int, outer_bevel : Int, compose : LibMagick::CompositeOperator)
Source
function(function : LibMagick::MagickFunction, args : Array(Float64))
Source
fuzz
Source
fx(expression : String)
Source
gamma(gamma : Float)
Source
gamma
Source
gaussian_blur(radius : Float, sigma : Float)
Source
get_region(width, height, x, y)
Source
gravity
Source
green_primary

Returns the chromaticity green primary point for the image as an x, y, z tuple.

Source
has_alpha?

Returns true if the image has an alpha channel.

Source
has_next?

Returns true if there are multiple images in the image set, and pos is less than the number of images.

Source
has_prev?

Returns true if there are multiple images in the image set, and pos is greater than zero.

Source
hash

Generates an UInt64 hash value for this object.

This method must have the property that a == b implies a.hash == b.hash.

The hash value is used along with == by the Hash class to determine if two objects reference the same hash key.

Subclasses must not override this method. Instead, they must define hash(hasher), though usually the macro def_hash can be used to generate this method.

Source
height

Return the height of the image.

Source
histogram(n_colors = nil)
Source
hough_line(width, height, threshold)
Source
identify
Source
identify_type
Source
image_similarity(reference : Wand, metric : LibMagick::MetricType, threshold : Float64)
Source
implode(radius, method : PixelInterpolateMethod = :average)
Source
import_pixels(pixels : Iterable(Int), width, height, depth : Int, map : String = "RGB")
Source
intent
Source
interlace_scheme
Source
interpolative_resize(width, height, method : LibMagick::PixelInterpolateMethod = :average, preserve_aspect_ratio : Bool = false)
Source
inverse_fourier_transform(phase_image : Pixie::Wand, magnitude = false)
Source
iterations
Source
kurtosis

TODO: Figure out how to specify a channel

Source
kuwahara_filter(radius : Float64, sigma : Float64)
Source
label(label : String)
Source
layers

Returns an Array(Image), where each image is a layer in the image. Useful for gif, pdf, psd, and any other image format with layers.

Example:

image = Image.new("/path/to/image.gif")
image.layers # => Array(Image)
Source
level(black_point : Float64, gamma : Float64, white_point : Float64)
Source
level_colors(black_color : Pixel, white_color : Pixel, invert = false)
Source
levelize(black_point : Float64, white_point : Float64, gamma : Float64)
Source
linear_stretch(black_point : Float64, white_point : Float64)
Source
liquid_rescale(width : Int, height : Int, delta_x : Float64 = 0.0, rigidity : Float64 = 0.0)
Source
lower(width : Int, height : Int, x : Int, y : Int)
Source
magnify
Source
matte_color
Source
mean
Source
mean_shift(width : Int, height : Int, color_distance : Float64)
Source
merge_layers(method : LibMagick::LayerMethod = :merge)
Source
minify
Source
modulate(brightness : Float64, saturation : Float64, hue : Float64)
Source
montage(thumbnail_geometry : String | Nil = nil, tile_geometry : String | Nil = nil, brush : Brush = Brush.new, mode : LibMagick::MontageMode = :undefined, frame : String | Nil = nil)

Create a montage from the images in the current set.

Source
morphology(n_frames : Int)
Source
morphology_method(method : LibMagick::MorphologyMethod, iterations : Int, kernel : Pointer(LibMagick::KernelInfo))
Source
motion_blur(radius : Float64, sigma : Float64, angle : Float64)
Source
negate(gray : Bool)
Source
next

Returns the next image in the image set.

Source
normalize
Source
oil_paint(radius : Float64, sigma : Float64)
Source
opaque_paint(target_color : Pixel, fill_color : Pixel, fuzz : Float64, invert : Bool = false)
Source
optimize_layers
Source
optimize_transparency
Source
ordered_dither(threshold_map : String)
Source
orientation
Source
page
Source
path

The location of the current working file

Source
pixel(x, y)

Get the pixel at the given x and y coordinates.

Source
pixel_interpolation_method
Source
pixels(x : Int = 0, y : Int = 0, columns : Int = width, rows : Int = height, map : String = "RGB", storage : LibMagick::StorageType = :char)

Extract pixel data from the image and return it as a multi-dimensional array of rows and columns, each containing an array of pixel data represnting the given map (defaulting to RGB). The map can be any combination or order of:

  • R = red
  • G = green
  • B = blue
  • A = alpha (0 is transparent)
  • O = opacity (0 is opaque)
  • C = cyan
  • Y = yellow
  • M = magenta
  • K = black
  • I = intensity (for grayscale)
  • P = pad

Example:

image = Image.new("/path/to/image.png")
image.pixels.each do |row|
  row.each do |col|
    puts col # => [255, 255, 255]
  end
end
Source
polaroid(brush : Brush, caption : String, angle : Float64, method : LibMagick::PixelInterpolateMethod = :average)
Source
polynomial(n_terms : Int, terms : Float64)
Source
pos

Returns the current position in the image set. Will always be zero for non-animated images.

Source
posterize(levels : Int, dither_method : LibMagick::DitherMethod = :none)
Source
prev

Returns the previous image in the image set.

Source
preview_transform(type : LibMagick::PreviewType)
Source
property(name : String)

Get a specific property of the image.

Example:

image = Image.new("/path/to/image.png")
image.property("date:create") # => "2019:01:01 12:00:00"
Source
quantize(n_colors : Int, colorspace : LibMagick::ColorspaceType, treedepth : Int, dither_method : LibMagick::DitherMethod = :none, measure_error : Bool = false)
Source
quantize_all(n_colors : Int, colorspace : LibMagick::ColorspaceType, treedepth : Int, dither_method : LibMagick::DitherMethod = :none, measure_error : Bool = false)
Source
query_fonts(pattern : String)
Source
query_formats(pattern : String)
Source
raise(width : Int, height : Int, x : Int, y : Int)
Source
random_threshold(low : Float64, high : Float64)
Source
range
Source
range_threshold(low_black : Float64, low_white : Float64, hight_white : Float64, hight_black : Float64)
Source
read(filename : String)
Source
read(buffer : IO)
Source
read(buffer : Bytes)
Source
red_primary

Returns the chromaticity red primary point for the image as an x, y, z tuple.

Source
remap(affinity : Wand, method : LibMagick::DitherMethod = :none)
Source
remove
Source
resample(x_resolution : Float64, y_resolution : Float64, filter : LibMagick::FilterType)
Source
reset_page(page : String)
Source
resize(width : Int, height : Int, filter : LibMagick::FilterType = :lanczos)

Resize the image to fit within the specified dimensions. Stretching may occur.

Source
resize_to_fit(width : Int, height : Int, filter : LibMagick::FilterType = :lanczos)

Resize the image to not be larger than the specified dimensions. No stretching will occur.

Source
resolution
Source
rewind

Reset the underlying iterator to the first image in the set.

Source
roll(x : Int, y : Int)
Source
rotate(background : Pixel, degrees : Float64)
Source
rotational_blur(angle : Float64)
Source
sample(width : Int, height : Int)
Source
scale(width : Int, height : Int)
Source
scene
Source
segment(colorspace : LibMagick::ColorspaceType, cluster_threshold : Float64, smooth_threshold : Float64, verbose = false)
Source
selective_blur(radius : Float64, sigma : Float64, threshold : Float64)
Source
separate(channel : LibMagick::ChannelType)
Source
sepia(threshold : Float64)
Source
set(image : Wand)
Source
set_alpha(value : LibMagick::AlphaChannelOption)

Set the image's alpha channel to the given LibMagick::AlphaChannelOption. Valid options are:

  • :undefined
  • :activate
  • :associate
  • :background
  • :copy
  • :deactivate
  • :discrete
  • :disassociate
  • :extract
  • :off
  • :on
  • :opaque
  • :remove
  • :set
  • :shape
  • :transparent
Source
set_artifact(key : String, value : String)
Source
set_background_color(background : Pixel)

Set the background color of the image to the given Pixie::Pixel.

Source
set_blue_primary(x, y, z)

Set the chromaticity blue primary point for the image to the given x, y, and z values.

Source
set_border_color(color : Pixel)

Set the border color of the image to the given Pixie::Pixel.

Example:

image = Image.new("/path/to/image.png")
image.border_color = Pixel::RED
Source
set_color(color : Pixel)
Source
set_colormap_color(index : Int, color : Pixel)
Source
set_colorspace(colorspace : LibMagick::ColorspaceType)
Source
set_composite_operator(op : LibMagick::CompositeOperator)
Source
set_compression(value : LibMagick::CompressionType)
Source
set_compression_quality(quality : Int)
Source
set_delay(val : Int)
Source
set_depth(val : Int)
Source
set_dispose(val : LibMagick::DisposeType)
Source
set_endian(val : LibMagick::EndianType)
Source
set_extent(width : Int, height : Int)
Source
set_filename(val : String)
Source
set_format(val : String)
Source
set_fuzz(val : Float64)
Source
set_gamma(val : Float64)
Source
set_gravity(val : Float64)
Source
set_green_primary(x, y, z)

Set the chromaticity green primary point for the image to the given x, y, and z values.

Source
set_intent(val : LibMagick::RenderingIntent)
Source
set_interlace_scheme(val : LibMagick::InterlaceType)
Source
set_iterations(val : Int)
Source
set_matte(val : Bool)
Source
set_matte_color(val : Pixel)
Source
set_orientation(val : LibMagick::OrienationType)
Source
set_page(width : Int, height : Int, x : Int, y : Int)
Source
set_pixel(x : Int, y : Int, color : Pixel)

Set the pixel at the given x and y coordinates.

Source
set_pixel_interpolation_method(val : LibMagick::PixelInterpolateMethod)
Source
set_pos(index : Int)

Sets the current position in the image set. Will always be zero for non-animated images.

Source
set_property(name : String, value : String)

Set a specific property of the image.

Example:

image = Image.new("/path/to/image.png")
image.set_property("exif:GPSLatitude", "40/1, 43/1, 54/1")
Source
set_red_primary(x, y, z)

Set the chromaticity red primary point for the image to the given x, y, and z values.

Source
set_resolution(x : Float64, y : Float64)
Source
set_scen(scene : Int)
Source
set_ticks_per_second(val : Int)
Source
set_type(val : LibMagick::ImageType)
Source
set_units(val : LibMagick::ResolutionType)
Source
set_virtual_pixel_method(val : LibMagick::VirtualPixelMethod)
Source
set_white_point(x : Float64, y : Float64, z : Float64)
Source
shade(azimuth : Float64, elevation : Float64, gray : Bool = false)
Source
shadow(alpha : Float64, sigma : Float64, x : Int, y : Int)
Source
sharpen(radius : Float64, sigma : Float64)
Source
shave(width : Int, height : Int)
Source
shear(background : Pixel, x : Float64, y : Float64)
Source
sigmoidal_constrast(alpha : Float64, beta : Float64, sharpen : Bool = false)
Source
signature
Source
size
Source
sketch(radius : Float64, sigma : Float64, angle : Float64)
Source
smush(offset : Int, stack : Bool = false)
Source
solarize(threshold : Float64)
Source
sparse_color(method : LibMagick::SparseColorMethod, args : Array(Float64))
Source
splice(width : Int, height : Int, x : Int, y : Int)
Source
spread(method : LibMagick::PixelInterpolateMethod, radius : Float64)
Source
statistic(type : LibMagick::StatisticType, width : Int, height : Int)
Source
statistics(channel : LibMagick::ChannelType)
Source
stego(watermark : Wand, offset : Int)
Source
stereo(offset : Wand)
Source
strip
Source
swirl(degrees : Float64, method : LibMagick::PixelInterpolateMethod)
Source
texture(texture : Wand)
Source
threshold(threshold : Float64)
Source
threshold_channel(channel : LibMagick::ChannelType, threshold : Float64)
Source
thumbnail(width : Int, height : Int)
Source
ticks_per_second
Source
tint(tint : Pixel, blend : Pixel)
Source
to_io
Source
to_unsafe
Source
to_unsafe_image
Source
total_ink_density
Source
transform_colorspace(colorspace : LibMagick::ColorspaceType)
Source
transparent_paint(target : Pixel, alpha : Float64, fuzz : Float64, invert : Bool = false)
Source
transpose
Source
transverse
Source
trim(fuzz : Float64)
Source
type
Source
units
Source
unsharp_mask(radius : Float64, sigma : Float64, gain : Float64, threshold : Float64)
Source
vignette(radius : Float64, sigma : Float64, x : Int, y : Int)
Source
virtual_pixel_method
Source
wave(amplitude : Float64, length : Float64, method : LibMagick::PixelInterpolateMethod)
Source
wavelet_denoise(threshold : Float64, softness : Float64)
Source
white_point
Source
white_threshold(threshold : Pixel)
Source
width

Return the width of the image.

Source
write(path : String)
Source
xmp

Return XMP data for the image as a Hash(String, String).

Source

Nested types