From 2477df78f4b865825087d932b97ce22ac90f7bc2 Mon Sep 17 00:00:00 2001 From: Cristy Date: Tue, 15 Oct 2019 17:39:35 -0400 Subject: [PATCH] ... --- MagickWand/montage.c | 21 +++++++++++++++++++-- utilities/montage.1.in | 1 + 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/MagickWand/montage.c b/MagickWand/montage.c index 0e549faa0..cf0f39d4f 100644 --- a/MagickWand/montage.c +++ b/MagickWand/montage.c @@ -157,6 +157,7 @@ static MagickBooleanType MontageUsage(void) " -interpolate method pixel color interpolation method\n" " -kerning value set the space between two letters\n" " -label string assign a label to an image\n" + " -layers method optimize, merge, or compare image layers\n" " -limit type value pixel cache resource limit\n" " -matte store matte channel if the image has one\n" " -mattecolor color frame color\n" @@ -602,7 +603,7 @@ WandExport MagickBooleanType MontageImageCommand(ImageInfo *image_info, Image *clone_images, *clone_list; - + clone_list=CloneImageList(image,exception); if (k != 0) clone_list=CloneImageList(image_stack[k-1].image,exception); @@ -612,7 +613,7 @@ WandExport MagickBooleanType MontageImageCommand(ImageInfo *image_info, if (*option == '+') clone_images=CloneImages(clone_list,"-1",exception); else - { + { i++; if (i == (ssize_t) argc) ThrowMontageException(OptionError,"MissingArgument",option); @@ -1127,6 +1128,22 @@ WandExport MagickBooleanType MontageImageCommand(ImageInfo *image_info, ThrowMontageException(OptionError,"MissingArgument",option); break; } + if (LocaleCompare("layers",option+1) == 0) + { + ssize_t + type; + + if (*option == '+') + break; + i++; + if (i == (ssize_t) argc) + ThrowMontageException(OptionError,"MissingArgument",option); + type=ParseCommandOption(MagickLayerOptions,MagickFalse,argv[i]); + if (type < 0) + ThrowMontageException(OptionError,"UnrecognizedLayerMethod", + argv[i]); + break; + } if (LocaleCompare("limit",option+1) == 0) { char diff --git a/utilities/montage.1.in b/utilities/montage.1.in index 351279251..a6214b759 100644 --- a/utilities/montage.1.in +++ b/utilities/montage.1.in @@ -48,6 +48,7 @@ Image Settings: \-interpolate method pixel color interpolation method \-kerning value set the space between two letters \-label string assign a label to an image + \-layers method optimize or compare image layers \-limit type value pixel cache resource limit \-matte store matte channel if the image has one \-mattecolor color frame color -- 2.40.0