diff --git a/wand/convert.c b/wand/convert.c
index d00fdb3..d156af6 100644
--- a/wand/convert.c
+++ b/wand/convert.c
@@ -302,8 +302,8 @@
"-flatten flatten a sequence of images",
"-fx expression apply mathematical expression to an image channel(s)",
"-hald-clut apply a Hald color lookup table to the image",
- "-intensity-projection",
- " the maximum (or minimum) intensity projection",
+ "-max return the maximum intensity of an image sequence",
+ "-min return the minimum intensity of an image sequence",
"-morph value morph an image sequence",
"-mosaic create a mosaic from an image sequence",
"-process arguments process the image with a custom image filter",
@@ -1609,8 +1609,6 @@
ThrowConvertInvalidArgumentException(option,argv[i]);
break;
}
- if (LocaleCompare("intensity-projection",option+1) == 0)
- break;
if (LocaleCompare("intent",option+1) == 0)
{
long
@@ -1885,6 +1883,8 @@
ThrowConvertException(OptionError,"MissingArgument",option);
break;
}
+ if (LocaleCompare("max",option+1) == 0)
+ break;
if (LocaleCompare("median",option+1) == 0)
{
if (*option == '+')
@@ -1896,6 +1896,8 @@
ThrowConvertInvalidArgumentException(option,argv[i]);
break;
}
+ if (LocaleCompare("min",option+1) == 0)
+ break;
if (LocaleCompare("modulate",option+1) == 0)
{
if (*option == '+')
diff --git a/wand/magick-image.c b/wand/magick-image.c
index 8eaad2d..87b21ce 100644
--- a/wand/magick-image.c
+++ b/wand/magick-image.c
@@ -6457,52 +6457,6 @@
% %
% %
% %
-% M a g i c k I n t e n s i t y P r o j e c t i o n I m a g e s %
-% %
-% %
-% %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% MagickIntensityProjectionImages() returns the maximum (or minimum) intensity
-% projection of an image sequence.
-%
-% The format of the MagickIntensityProjectionImages method is:
-%
-% MagickWand *MagickIntensityProjectionImages(MagickWand *wand,
-% const MagickBooleanType projection)
-%
-% A description of each parameter follows:
-%
-% o wand: the magick wand.
-%
-% o projection: compute the minimum intensity projection for a value
-% other than 0, otherwise compute the maximum.
-%
-*/
-WandExport MagickWand *MagickIntensityProjectionImages(MagickWand *wand,
- const MagickBooleanType projection)
-{
- Image
- *projection_image;
-
- assert(wand != (MagickWand *) NULL);
- assert(wand->signature == WandSignature);
- if (wand->debug != MagickFalse)
- (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- if (wand->images == (Image *) NULL)
- return((MagickWand *) NULL);
- projection_image=IntensityProjectionImages(wand->images,projection,
- wand->exception);
- if (projection_image == (Image *) NULL)
- return((MagickWand *) NULL);
- return(CloneMagickWandFromImages(wand,projection_image));
-}
-
-/*
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% %
-% %
-% %
% M a g i c k I n v e r s e F o u r i e r T r a n s f o r m I m a g e %
% %
% %
@@ -6817,6 +6771,45 @@
% %
% %
% %
+% M a g i c k M a x I m a g e s %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% MagickMaxImages() returns the maximum intensity of an image sequence.
+%
+% The format of the MagickMaxImages method is:
+%
+% MagickWand *MagickMaxImages(MagickWand *wand)
+%
+% A description of each parameter follows:
+%
+% o wand: the magick wand.
+%
+*/
+WandExport MagickWand *MagickMaxImages(MagickWand *wand)
+{
+ Image
+ *max_image;
+
+ assert(wand != (MagickWand *) NULL);
+ assert(wand->signature == WandSignature);
+ if (wand->debug != MagickFalse)
+ (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
+ if (wand->images == (Image *) NULL)
+ return((MagickWand *) NULL);
+ max_image=MaxImages(wand->images,wand->exception);
+ if (max_image == (Image *) NULL)
+ return((MagickWand *) NULL);
+ return(CloneMagickWandFromImages(wand,max_image));
+}
+
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
% M a g i c k M e d i a n F i l t e r I m a g e %
% %
% %
@@ -6924,6 +6917,45 @@
% %
% %
% %
+% M a g i c k M i n I m a g e s %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% MagickMinImages() returns the minimum intensity of an image sequence.
+%
+% The format of the MagickMinImages method is:
+%
+% MagickWand *MagickMinImages(MagickWand *wand)
+%
+% A description of each parameter follows:
+%
+% o wand: the magick wand.
+%
+*/
+WandExport MagickWand *MagickMinImages(MagickWand *wand)
+{
+ Image
+ *min_image;
+
+ assert(wand != (MagickWand *) NULL);
+ assert(wand->signature == WandSignature);
+ if (wand->debug != MagickFalse)
+ (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
+ if (wand->images == (Image *) NULL)
+ return((MagickWand *) NULL);
+ min_image=MinImages(wand->images,wand->exception);
+ if (min_image == (Image *) NULL)
+ return((MagickWand *) NULL);
+ return(CloneMagickWandFromImages(wand,min_image));
+}
+
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
% M a g i c k M i n i f y I m a g e %
% %
% %
diff --git a/wand/magick-image.h b/wand/magick-image.h
index 23ce233..41f036f 100644
--- a/wand/magick-image.h
+++ b/wand/magick-image.h
@@ -386,7 +386,8 @@
*MagickGetImageClipMask(MagickWand *),
*MagickGetImageRegion(MagickWand *,const unsigned long,const unsigned long,
const long,const long),
- *MagickIntensityProjectionImages(MagickWand *,const MagickBooleanType),
+ *MagickMaxImages(MagickWand *),
+ *MagickMinImages(MagickWand *),
*MagickMergeImageLayers(MagickWand *,const ImageLayerMethod),
*MagickMorphImages(MagickWand *,const unsigned long),
*MagickMontageImage(MagickWand *,const DrawingWand *,const char *,
diff --git a/wand/mogrify.c b/wand/mogrify.c
index 73c588b..d13b9bc 100644
--- a/wand/mogrify.c
+++ b/wand/mogrify.c
@@ -3808,8 +3808,8 @@
"-flatten flatten a sequence of images",
"-fx expression apply mathematical expression to an image channel(s)",
"-hald-clut apply a Hald color lookup table to the image",
- "-intensity-projection",
- " the maximum (or minimum) intensity projection",
+ "-max return the maximum intensity of an image sequence",
+ "-min return the minimum intensity of an image sequence",
"-morph value morph an image sequence",
"-mosaic create a mosaic from an image sequence",
"-process arguments process the image with a custom image filter",
@@ -5085,8 +5085,6 @@
ThrowMogrifyInvalidArgumentException(option,argv[i]);
break;
}
- if (LocaleCompare("intensity-projection",option+1) == 0)
- break;
if (LocaleCompare("intent",option+1) == 0)
{
long
@@ -5350,6 +5348,10 @@
ThrowMogrifyException(OptionError,"MissingArgument",option);
break;
}
+ if (LocaleCompare("max",option+1) == 0)
+ break;
+ if (LocaleCompare("min",option+1) == 0)
+ break;
if (LocaleCompare("modulate",option+1) == 0)
{
if (*option == '+')
@@ -7915,23 +7917,6 @@
*images=GetFirstImageInList(q);
break;
}
- if (LocaleCompare("intensity-projection",option+1) == 0)
- {
- Image
- *projection_image;
-
- (void) SyncImagesSettings(image_info,*images);
- projection_image=IntensityProjectionImages(*images,*option == '+' ?
- MagickTrue : MagickFalse,exception);
- if (projection_image == (Image *) NULL)
- {
- status=MagickFalse;
- break;
- }
- *images=DestroyImageList(*images);
- *images=projection_image;
- break;
- }
break;
}
case 'l':
@@ -8120,6 +8105,38 @@
i++;
break;
}
+ if (LocaleCompare("max",option+1) == 0)
+ {
+ Image
+ *max_image;
+
+ (void) SyncImagesSettings(image_info,*images);
+ max_image=MaxImages(*images,exception);
+ if (max_image == (Image *) NULL)
+ {
+ status=MagickFalse;
+ break;
+ }
+ *images=DestroyImageList(*images);
+ *images=max_image;
+ break;
+ }
+ if (LocaleCompare("min",option+1) == 0)
+ {
+ Image
+ *min_image;
+
+ (void) SyncImagesSettings(image_info,*images);
+ min_image=MinImages(*images,exception);
+ if (min_image == (Image *) NULL)
+ {
+ status=MagickFalse;
+ break;
+ }
+ *images=DestroyImageList(*images);
+ *images=min_image;
+ break;
+ }
if (LocaleCompare("morph",option+1) == 0)
{
Image