dmagick.Array

Members

Aliases

ImageLayerMethod
alias ImageLayerMethod = dmagick.c.layer.ImageLayerMethod
ssize_t
alias ssize_t = ptrdiff_t
Undocumented in source.

Functions

animationDelay
void animationDelay(Image[] images, Duration delay)

Set the animationDelay for all images in the array.

animationIterations
void animationIterations(Image[] images, size_t iterations)

Number of iterations to loop an animation.

average
Image average(Image[] images)

Averages all the images together. Each image in the image must have the same width and height.

clone
Image[] clone(const(Image)[] images)

Clone every image in the array.

coalesce
Image[] coalesce(Image[] images)

Merges all the images in the imagelist into a new imagelist. Each image in the new imagelist is formed by flattening all the previous images.

compareLayers
Image[] compareLayers(Image[] images, ImageLayerMethod method)

Compares each image with the next in a sequence and returns the minimum bounding region of all the pixel differences (of the ImageLayerMethod specified) it discovers.

compositeLayers
void compositeLayers(Image[] destination, Image[] source, ssize_t xOffset, ssize_t yOffset, CompositeOperator operator)

An image from source is composited over an image from destination until one list is finished. Unlike a normal composite operation, the canvas offset is also included to the composite positioning. If one of the image lists only contains one image, that image is applied to all the images in the other image list, regardless of which list it is. In this case it is the image meta-data of the list which preserved.

display
void display(Image[] images)

Repeatedly displays an image sequence to a X window screen.

fx
void fx(Image[] images, string expression, ChannelType channel)

Applies a mathematical expression to the specified images.

mergeLayers
Image mergeLayers(Image[] layers, ImageLayerMethod method)

Composes all the image layers from the current given image onward to produce a single image of the merged layers.

montage
Image[] montage(Image[] images, Montage montageInfo)

Creates a composite image by reducing the size of the input images and arranging them in a grid on the background color or texture of your choice. There are many configuration options. For example, you can specify the number of columns and rows, the distance between images, and include a label with each small image (called a tile).

morph
Image[] morph(Image[] images, size_t frames)

Transforms a image into another image by inserting n in-between images. Requires at least two images. If more images are present, the 2nd image is transformed into the 3rd, the 3rd to the 4th, etc.

optimizeLayers
Image[] optimizeLayers(Image[] images)

For each image compares the GIF disposed forms of the previous image in the sequence. From this it attempts to select the smallest cropped image to replace each frame, while preserving the results of the GIF animation.

optimizePlusLayers
Image[] optimizePlusLayers(Image[] images)

Is exactly as optimizeLayers, but may also add or even remove extra frames in the animation, if it improves the total number of pixels in the resulting GIF animation.

ping
Image[] ping(string filename)
Image[] ping(void[] blob)
Image[] ping(void[] blob, Geometry size)
Image[] ping(void[] blob, Geometry size, size_t depth)
Image[] ping(void[] blob, Geometry size, size_t depth, string magick)
Image[] ping(void[] blob, Geometry size, string magick)

Ping is similar to read except only enough of the image is read to determine the image columns, rows, and filesize. The columns, rows, and fileSize attributes are valid after invoking ping. The image data is not valid after calling ping.

quantize
void quantize(Image[] images, bool measureError)

Analyzes the colors within a set of reference images and chooses a fixed number of colors to represent the set. The goal of the algorithm is to minimize the difference between the input and output images while minimizing the processing time.

quantizeColorSpace
void quantizeColorSpace(Image[] images, ColorspaceType type)
ColorspaceType quantizeColorSpace(const(Image)[] images)

Colorspace to quantize colors in. Empirical evidence suggests that distances in color spaces such as YUV or YIQ correspond to perceptual color differences more closely than do distances in RGB space. These color spaces may give better results when color reducing an image. The default is RGB

quantizeColors
void quantizeColors(Image[] images, size_t colors)
size_t quantizeColors(const(Image)[] images)

Preferred number of _colors in the image. The actual number of _colors in the image may be less than your request, but never more. Images with less unique _colors than specified with this option will have any duplicate or unused _colors removed.

quantizeDitherMethod
void quantizeDitherMethod(Image[] images, DitherMethod method)
DitherMethod quantizeDitherMethod(const(Image)[] images)

The basic strategy of dithering is to trade intensity resolution for spatial resolution by averaging the intensities of several neighboring pixels. Images which suffer from severe contouring when reducing colors can be improved with this option.

quantizeTreeDepth
void quantizeTreeDepth(Image[] images, size_t depth)
size_t quantizeTreeDepth(const(Image)[] images)

Depth of the quantization color classification tree. Values of 0 or 1 allow selection of the optimal tree _depth for the color reduction algorithm. Values between 2 and 8 may be used to manually adjust the tree _depth.

readImages
Image[] readImages(string filename)
Image[] readImages(string filename, Geometry size)

Read a multi frame Image by reading from the file or URL specified by filename.

readImages
Image[] readImages(void[] blob)
Image[] readImages(void[] blob, Geometry size)
Image[] readImages(void[] blob, Geometry size, size_t depth)
Image[] readImages(void[] blob, Geometry size, size_t depth, string magick)
Image[] readImages(void[] blob, Geometry size, string magick)

Reads a multi frame Image from an in-memory blob. The Blob size, depth and magick format may also be specified.

remap
void remap(Image[] images, Image referenceImage)

Reduce the colors used in the imagelist to the set of colors in reference image.

toBlob
void[] toBlob(Image[] images, string magick, size_t depth, bool adjoin)

Creates a Binary Large OBject, a direct-to-memory version of the image.

writeImages
void writeImages(Image[] images, string filename, bool adjoin)

Writes the image to the specified file. ImageMagick determines image format from the prefix or extension.

Meta

License

zlib (See accompanying LICENSE file)

Authors

Mike Wey

This module contains functions that operate on a array or list of images.