diff --git a/MagickCore/identify.c b/MagickCore/identify.c
index e99f0f1..dcda30f 100644
--- a/MagickCore/identify.c
+++ b/MagickCore/identify.c
@@ -481,73 +481,6 @@
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
if (file == (FILE *) NULL)
file=stdout;
- locate=GetImageArtifact(image,"identify:locate");
- if (locate != (const char *) NULL)
- {
- const char
- *limit;
-
- size_t
- max_locations;
-
- StatisticType
- type;
-
- /*
- Display minimum, maximum, or mean pixel locations.
- */
- type=(StatisticType) ParseCommandOption(MagickStatisticOptions,
- MagickFalse,locate);
- limit=GetImageArtifact(image,"identify:limit");
- max_locations=0;
- if (limit != (const char *) NULL)
- max_locations=StringToUnsignedLong(limit);
- channel_statistics=GetLocationStatistics(image,type,exception);
- if (channel_statistics == (ChannelStatistics *) NULL)
- return(MagickFalse);
- colorspace=image->colorspace;
- if (IsImageGray(image,exception) != MagickFalse)
- colorspace=GRAYColorspace;
- (void) FormatLocaleFile(file,"Channel %s locations:\n",locate);
- switch (colorspace)
- {
- case RGBColorspace:
- default:
- {
- (void) PrintChannelLocations(file,image,RedPixelChannel,"Red",
- type,max_locations,channel_statistics);
- (void) PrintChannelLocations(file,image,GreenPixelChannel,"Green",
- type,max_locations,channel_statistics);
- (void) PrintChannelLocations(file,image,BluePixelChannel,"Blue",
- type,max_locations,channel_statistics);
- break;
- }
- case CMYKColorspace:
- {
- (void) PrintChannelLocations(file,image,CyanPixelChannel,"Cyan",
- type,max_locations,channel_statistics);
- (void) PrintChannelLocations(file,image,MagentaPixelChannel,"Magenta",
- type,max_locations,channel_statistics);
- (void) PrintChannelLocations(file,image,YellowPixelChannel,"Yellow",
- type,max_locations,channel_statistics);
- (void) PrintChannelLocations(file,image,BlackPixelChannel,"Black",
- type,max_locations,channel_statistics);
- break;
- }
- case GRAYColorspace:
- {
- (void) PrintChannelLocations(file,image,GrayPixelChannel,"Gray",
- type,max_locations,channel_statistics);
- break;
- }
- }
- if (image->alpha_trait == BlendPixelTrait)
- (void) PrintChannelLocations(file,image,AlphaPixelChannel,"Alpha",
- type,max_locations,channel_statistics);
- channel_statistics=(ChannelStatistics *) RelinquishMagickMemory(
- channel_statistics);
- return(ferror(file) != 0 ? MagickFalse : MagickTrue);
- }
*format='\0';
elapsed_time=GetElapsedTime(&image->timer);
user_time=GetUserTime(&image->timer);
@@ -675,6 +608,72 @@
MagickTypeOptions,(ssize_t) image->type));
(void) FormatLocaleFile(file," Endianess: %s\n",CommandOptionToMnemonic(
MagickEndianOptions,(ssize_t) image->endian));
+ locate=GetImageArtifact(image,"identify:locate");
+ if (locate != (const char *) NULL)
+ {
+ const char
+ *limit;
+
+ size_t
+ max_locations;
+
+ StatisticType
+ type;
+
+ /*
+ Display minimum, maximum, or mean pixel locations.
+ */
+ type=(StatisticType) ParseCommandOption(MagickStatisticOptions,
+ MagickFalse,locate);
+ limit=GetImageArtifact(image,"identify:limit");
+ max_locations=0;
+ if (limit != (const char *) NULL)
+ max_locations=StringToUnsignedLong(limit);
+ channel_statistics=GetLocationStatistics(image,type,exception);
+ if (channel_statistics == (ChannelStatistics *) NULL)
+ return(MagickFalse);
+ colorspace=image->colorspace;
+ if (IsImageGray(image,exception) != MagickFalse)
+ colorspace=GRAYColorspace;
+ (void) FormatLocaleFile(file,"Channel %s locations:\n",locate);
+ switch (colorspace)
+ {
+ case RGBColorspace:
+ default:
+ {
+ (void) PrintChannelLocations(file,image,RedPixelChannel,"Red",
+ type,max_locations,channel_statistics);
+ (void) PrintChannelLocations(file,image,GreenPixelChannel,"Green",
+ type,max_locations,channel_statistics);
+ (void) PrintChannelLocations(file,image,BluePixelChannel,"Blue",
+ type,max_locations,channel_statistics);
+ break;
+ }
+ case CMYKColorspace:
+ {
+ (void) PrintChannelLocations(file,image,CyanPixelChannel,"Cyan",
+ type,max_locations,channel_statistics);
+ (void) PrintChannelLocations(file,image,MagentaPixelChannel,"Magenta",
+ type,max_locations,channel_statistics);
+ (void) PrintChannelLocations(file,image,YellowPixelChannel,"Yellow",
+ type,max_locations,channel_statistics);
+ (void) PrintChannelLocations(file,image,BlackPixelChannel,"Black",
+ type,max_locations,channel_statistics);
+ break;
+ }
+ case GRAYColorspace:
+ {
+ (void) PrintChannelLocations(file,image,GrayPixelChannel,"Gray",
+ type,max_locations,channel_statistics);
+ break;
+ }
+ }
+ if (image->alpha_trait == BlendPixelTrait)
+ (void) PrintChannelLocations(file,image,AlphaPixelChannel,"Alpha",
+ type,max_locations,channel_statistics);
+ channel_statistics=(ChannelStatistics *) RelinquishMagickMemory(
+ channel_statistics);
+ }
/*
Detail channel depth and extrema.
*/