diff options
| author | Mike Wey | 2011-09-25 23:54:24 +0200 |
|---|---|---|
| committer | Mike Wey | 2011-09-25 23:54:24 +0200 |
| commit | 0927a16764b5ccd2ea7275bb26da8c097ce40929 (patch) | |
| tree | f313f2cead4c1ccae9d0a5b6369cbac86cf21d90 | |
| parent | 6d6a4d2388220cd084170df5c295bb963e11c829 (diff) | |
Add dmagick.Array.montage.
| -rw-r--r-- | GNUmakefile | 4 | ||||
| -rw-r--r-- | dmagick/Array.d | 19 | ||||
| -rw-r--r-- | dmagick/Montage.d | 2 |
3 files changed, 20 insertions, 5 deletions
diff --git a/GNUmakefile b/GNUmakefile index ed9dc8d..bff4ed3 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -10,8 +10,8 @@ all: lib ifndef DC ifneq ($(strip $(shell which dmd 2>/dev/null)),) DC=dmd - else ifneq ($(strip $(shell which ldc 2>/dev/null)),) - DC=ldc + else ifneq ($(strip $(shell which ldc2 2>/dev/null)),) + DC=ldc2 else DC=gdc endif diff --git a/dmagick/Array.d b/dmagick/Array.d index e9e098c..52f5f9f 100644 --- a/dmagick/Array.d +++ b/dmagick/Array.d @@ -15,6 +15,7 @@ import core.sys.posix.sys.types; import dmagick.Exception; import dmagick.Geometry; import dmagick.Image; +import dmagick.Montage; import dmagick.Options; import dmagick.c.blob; @@ -221,7 +222,23 @@ Image mergeLayers(Image[] layers, ImageLayerMethod method = ImageLayerMethod.Fla return new Image(image); } -//TODO: montage. +/** + * 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). + * + * To add labels to the tiles, assign a "Label" property to each image. + */ +Image montage(Image[] images, Montage montageInfo) +{ + linkImages(images); + scope(exit) unlinkImages(images); + + MagickCoreImage* image = + MontageImages(images[0].imageRef, montageInfo.montageInfoRef, DMagickExceptionInfo()); +} /** * Transforms a image into another image by inserting n in-between images. diff --git a/dmagick/Montage.d b/dmagick/Montage.d index 1d2d6f6..68bb98b 100644 --- a/dmagick/Montage.d +++ b/dmagick/Montage.d @@ -220,8 +220,6 @@ class Montage { return to!(string)(montageInfoRef.texture); } - - //tile - rows and columns } /** |
