46#include "magick/studio.h"
47#include "magick/annotate.h"
48#include "magick/artifact.h"
49#include "magick/attribute.h"
50#include "magick/blob.h"
51#include "magick/blob-private.h"
52#include "magick/cache.h"
53#include "magick/client.h"
54#include "magick/coder.h"
55#include "magick/color.h"
56#include "magick/configure.h"
57#include "magick/constitute.h"
58#include "magick/decorate.h"
59#include "magick/delegate.h"
60#include "magick/draw.h"
61#include "magick/effect.h"
62#include "magick/exception.h"
63#include "magick/exception-private.h"
64#include "magick/feature.h"
65#include "magick/gem.h"
66#include "magick/geometry.h"
67#include "magick/histogram.h"
68#include "magick/identify.h"
69#include "magick/image.h"
70#include "magick/image-private.h"
71#include "magick/list.h"
72#include "magick/locale_.h"
73#include "magick/log.h"
74#include "magick/magic.h"
75#include "magick/magick.h"
76#include "magick/memory_.h"
77#include "magick/module.h"
78#include "magick/monitor.h"
79#include "magick/montage.h"
80#include "magick/option.h"
81#include "magick/pixel-private.h"
82#include "magick/prepress.h"
83#include "magick/profile.h"
84#include "magick/property.h"
85#include "magick/quantize.h"
86#include "magick/quantum.h"
87#include "magick/random_.h"
88#include "magick/registry.h"
89#include "magick/resize.h"
90#include "magick/resource_.h"
91#include "magick/signature.h"
92#include "magick/statistic.h"
93#include "magick/string_.h"
94#include "magick/string-private.h"
95#include "magick/timer.h"
96#include "magick/timer-private.h"
97#include "magick/token.h"
98#include "magick/utility.h"
99#include "magick/version.h"
146 assert(image != (
Image *) NULL);
147 assert(image->signature == MagickCoreSignature);
148 if (IsEventLogging() != MagickFalse)
149 (void) LogMagickEvent(TraceEvent,GetMagickModule(),
"%s",image->filename);
150 length=CompositeChannels+1UL;
152 sizeof(*channel_statistics));
154 ThrowFatalException(ResourceLimitFatalError,
"MemoryAllocationFailed");
155 (void) memset(channel_statistics,0,length*
156 sizeof(*channel_statistics));
157 for (i=0; i <= (ssize_t) CompositeChannels; i++)
161 case MaximumStatistic:
164 channel_statistics[i].maxima=(-MagickMaximumValue);
167 case MinimumStatistic:
169 channel_statistics[i].minima=MagickMaximumValue;
174 for (y=0; y < (ssize_t) image->rows; y++)
177 *magick_restrict indexes;
185 p=GetVirtualPixels(image,0,y,image->columns,1,exception);
188 indexes=GetVirtualIndexQueue(image);
189 for (x=0; x < (ssize_t) image->columns; x++)
193 case MaximumStatistic:
196 if ((
double) GetPixelRed(p) > channel_statistics[RedChannel].maxima)
197 channel_statistics[RedChannel].maxima=(
double) GetPixelRed(p);
198 if ((
double) GetPixelGreen(p) > channel_statistics[GreenChannel].maxima)
199 channel_statistics[GreenChannel].maxima=(double) GetPixelGreen(p);
200 if ((
double) GetPixelBlue(p) > channel_statistics[BlueChannel].maxima)
201 channel_statistics[BlueChannel].maxima=(
double) GetPixelBlue(p);
202 if ((image->matte != MagickFalse) &&
203 ((
double) GetPixelOpacity(p) > channel_statistics[OpacityChannel].maxima))
204 channel_statistics[OpacityChannel].maxima=(double)
206 if ((image->colorspace == CMYKColorspace) &&
207 ((double) GetPixelIndex(indexes+x) > channel_statistics[BlackChannel].maxima))
208 channel_statistics[BlackChannel].maxima=(double)
209 GetPixelIndex(indexes+x);
212 case MinimumStatistic:
214 if ((
double) GetPixelRed(p) < channel_statistics[RedChannel].minima)
215 channel_statistics[RedChannel].minima=(
double) GetPixelRed(p);
216 if ((
double) GetPixelGreen(p) < channel_statistics[GreenChannel].minima)
217 channel_statistics[GreenChannel].minima=(double) GetPixelGreen(p);
218 if ((
double) GetPixelBlue(p) < channel_statistics[BlueChannel].minima)
219 channel_statistics[BlueChannel].minima=(
double) GetPixelBlue(p);
220 if ((image->matte != MagickFalse) &&
221 ((
double) GetPixelOpacity(p) < channel_statistics[OpacityChannel].minima))
222 channel_statistics[OpacityChannel].minima=(double)
224 if ((image->colorspace == CMYKColorspace) &&
225 ((double) GetPixelIndex(indexes+x) < channel_statistics[BlackChannel].minima))
226 channel_statistics[BlackChannel].minima=(double)
227 GetPixelIndex(indexes+x);
234 return(channel_statistics);
237static ssize_t PrintChannelFeatures(FILE *file,
const ChannelType channel,
240#define PrintFeature(feature) \
241 GetMagickPrecision(),(feature)[0], \
242 GetMagickPrecision(),(feature)[1], \
243 GetMagickPrecision(),(feature)[2], \
244 GetMagickPrecision(),(feature)[3], \
245 GetMagickPrecision(),((feature)[0]+(feature)[1]+(feature)[2]+(feature)[3])/4.0 \
247#define FeaturesFormat " %s:\n" \
248 " Angular Second Moment:\n" \
249 " %.*g, %.*g, %.*g, %.*g, %.*g\n" \
251 " %.*g, %.*g, %.*g, %.*g, %.*g\n" \
253 " %.*g, %.*g, %.*g, %.*g, %.*g\n" \
254 " Sum of Squares Variance:\n" \
255 " %.*g, %.*g, %.*g, %.*g, %.*g\n" \
256 " Inverse Difference Moment:\n" \
257 " %.*g, %.*g, %.*g, %.*g, %.*g\n" \
259 " %.*g, %.*g, %.*g, %.*g, %.*g\n" \
261 " %.*g, %.*g, %.*g, %.*g, %.*g\n" \
263 " %.*g, %.*g, %.*g, %.*g, %.*g\n" \
265 " %.*g, %.*g, %.*g, %.*g, %.*g\n" \
266 " Difference Variance:\n" \
267 " %.*g, %.*g, %.*g, %.*g, %.*g\n" \
268 " Difference Entropy:\n" \
269 " %.*g, %.*g, %.*g, %.*g, %.*g\n" \
270 " Information Measure of Correlation 1:\n" \
271 " %.*g, %.*g, %.*g, %.*g, %.*g\n" \
272 " Information Measure of Correlation 2:\n" \
273 " %.*g, %.*g, %.*g, %.*g, %.*g\n" \
274 " Maximum Correlation Coefficient:\n" \
275 " %.*g, %.*g, %.*g, %.*g, %.*g\n"
280 n=FormatLocaleFile(file,FeaturesFormat,name,
281 PrintFeature(channel_features[channel].angular_second_moment),
282 PrintFeature(channel_features[channel].contrast),
283 PrintFeature(channel_features[channel].correlation),
284 PrintFeature(channel_features[channel].variance_sum_of_squares),
285 PrintFeature(channel_features[channel].inverse_difference_moment),
286 PrintFeature(channel_features[channel].sum_average),
287 PrintFeature(channel_features[channel].sum_variance),
288 PrintFeature(channel_features[channel].sum_entropy),
289 PrintFeature(channel_features[channel].entropy),
290 PrintFeature(channel_features[channel].difference_variance),
291 PrintFeature(channel_features[channel].difference_entropy),
292 PrintFeature(channel_features[channel].measure_of_correlation_1),
293 PrintFeature(channel_features[channel].measure_of_correlation_2),
294 PrintFeature(channel_features[channel].maximum_correlation_coefficient));
298static ssize_t PrintChannelLocations(FILE *file,
const Image *image,
299 const ChannelType channel,
const char *name,
const StatisticType type,
314 case MaximumStatistic:
317 target=channel_statistics[channel].maxima;
322 target=channel_statistics[channel].mean;
325 case MinimumStatistic:
327 target=channel_statistics[channel].minima;
331 (void) FormatLocaleFile(file,
" %s: %.*g (%.*g)",name,GetMagickPrecision(),
332 target,GetMagickPrecision(),QuantumScale*target);
333 exception=AcquireExceptionInfo();
335 for (y=0; y < (ssize_t) image->rows; y++)
343 p=GetVirtualPixels(image,0,y,image->columns,1,exception);
346 for (x=0; x < (ssize_t) image->columns; x++)
356 match=fabs((
double) p->red-target) < 0.5 ? MagickTrue : MagickFalse;
361 match=fabs((
double) p->green-target) < 0.5 ? MagickTrue :
367 match=fabs((
double) p->blue-target) < 0.5 ? MagickTrue :
373 match=fabs((
double) p->opacity-target) < 0.5 ? MagickTrue :
380 if (match != MagickFalse)
382 if ((max_locations != 0) && (n >= (ssize_t) max_locations))
384 (void) FormatLocaleFile(file,
" %.20g,%.20g",(
double) x,(double) y);
389 if (x < (ssize_t) image->columns)
392 (void) FormatLocaleFile(file,
"\n");
396static ssize_t PrintChannelMoments(FILE *file,
const ChannelType channel,
397 const char *name,
const double scale,
const ChannelMoments *channel_moments)
400 powers[MaximumNumberOfImageMoments] =
401 { 1.0, 2.0, 3.0, 3.0, 6.0, 4.0, 6.0, 4.0 };
409 n=FormatLocaleFile(file,
" %s:\n",name);
410 n+=FormatLocaleFile(file,
" Centroid: %.*g,%.*g\n",
411 GetMagickPrecision(),channel_moments[channel].centroid.x,
412 GetMagickPrecision(),channel_moments[channel].centroid.y);
413 n+=FormatLocaleFile(file,
" Ellipse Semi-Major/Minor axis: %.*g,%.*g\n",
414 GetMagickPrecision(),channel_moments[channel].ellipse_axis.x,
415 GetMagickPrecision(),channel_moments[channel].ellipse_axis.y);
416 n+=FormatLocaleFile(file,
" Ellipse angle: %.*g\n",
417 GetMagickPrecision(),channel_moments[channel].ellipse_angle);
418 n+=FormatLocaleFile(file,
" Ellipse eccentricity: %.*g\n",
419 GetMagickPrecision(),channel_moments[channel].ellipse_eccentricity);
420 n+=FormatLocaleFile(file,
" Ellipse intensity: %.*g (%.*g)\n",
421 GetMagickPrecision(),pow(scale,powers[0])*
422 channel_moments[channel].ellipse_intensity,GetMagickPrecision(),
423 channel_moments[channel].ellipse_intensity);
424 for (i=0; i < MaximumNumberOfImageMoments; i++)
425 n+=FormatLocaleFile(file,
" I%.20g: %.*g (%.*g)\n",i+1.0,
426 GetMagickPrecision(),channel_moments[channel].I[i]/pow(scale,powers[i]),
427 GetMagickPrecision(),channel_moments[channel].I[i]);
431static ssize_t PrintChannelPerceptualHash(FILE *file,
const ChannelType channel,
440 n=FormatLocaleFile(file,
" %s:\n",name);
441 for (i=0; i < MaximumNumberOfPerceptualHashes; i++)
442 n+=FormatLocaleFile(file,
" PH%.20g: %.*g, %.*g\n",i+1.0,
443 GetMagickPrecision(),channel_phash[channel].P[i],
444 GetMagickPrecision(),channel_phash[channel].Q[i]);
448static ssize_t PrintChannelStatistics(FILE *file,
const ChannelType channel,
449 const char *name,
const double scale,
452#define StatisticsFormat " %s:\n min: %.*g (%.*g)\n " \
453 "max: %.*g (%.*g)\n mean: %.*g (%.*g)\n " \
454 "standard deviation: %.*g (%.*g)\n kurtosis: %.*g\n " \
455 "skewness: %.*g\n entropy: %.*g\n"
460 n=FormatLocaleFile(file,StatisticsFormat,name,GetMagickPrecision(),
461 (
double) ClampToQuantum((MagickRealType) (scale*
462 channel_statistics[channel].minima)),GetMagickPrecision(),
463 channel_statistics[channel].minima/(
double) QuantumRange,
464 GetMagickPrecision(),(
double) ClampToQuantum((MagickRealType) (scale*
465 channel_statistics[channel].maxima)),GetMagickPrecision(),
466 channel_statistics[channel].maxima/(
double) QuantumRange,
467 GetMagickPrecision(),scale*channel_statistics[channel].mean,
468 GetMagickPrecision(),channel_statistics[channel].mean/(
double) QuantumRange,
469 GetMagickPrecision(),scale*channel_statistics[channel].standard_deviation,
470 GetMagickPrecision(),channel_statistics[channel].standard_deviation/
471 (
double) QuantumRange,GetMagickPrecision(),
472 channel_statistics[channel].kurtosis,GetMagickPrecision(),
473 channel_statistics[channel].skewness,GetMagickPrecision(),
474 channel_statistics[channel].entropy);
478MagickExport MagickBooleanType IdentifyImage(
Image *image,FILE *file,
479 const MagickBooleanType verbose)
482 color[MaxTextExtent],
483 format[MaxTextExtent],
484 iso8601[
sizeof(
"9999-99-99T99:99:99Z")],
548 assert(image != (
Image *) NULL);
549 assert(image->signature == MagickCoreSignature);
550 if (IsEventLogging() != MagickFalse)
551 (void) LogMagickEvent(TraceEvent,GetMagickModule(),
"%s",image->filename);
552 if (file == (FILE *) NULL)
554 exception=AcquireExceptionInfo();
555 colorspace=image->colorspace;
556 locate=GetImageArtifact(image,
"identify:locate");
557 if (locate != (
const char *) NULL)
571 statistic_type=(StatisticType) ParseCommandOption(MagickStatisticOptions,
573 limit=GetImageArtifact(image,
"identify:limit");
575 if (limit != (
const char *) NULL)
576 max_locations=StringToUnsignedLong(limit);
577 channel_statistics=GetLocationStatistics(image,statistic_type,exception);
580 (void) FormatLocaleFile(file,
" Channel %s locations:\n",locate);
586 (void) PrintChannelLocations(file,image,RedChannel,
"Red",
587 statistic_type,max_locations,channel_statistics);
588 (void) PrintChannelLocations(file,image,GreenChannel,
"Green",
589 statistic_type,max_locations,channel_statistics);
590 (void) PrintChannelLocations(file,image,BlueChannel,
"Blue",
591 statistic_type,max_locations,channel_statistics);
596 (void) PrintChannelLocations(file,image,CyanChannel,
"Cyan",
597 statistic_type,max_locations,channel_statistics);
598 (void) PrintChannelLocations(file,image,MagentaChannel,
"Magenta",
599 statistic_type,max_locations,channel_statistics);
600 (void) PrintChannelLocations(file,image,YellowChannel,
"Yellow",
601 statistic_type,max_locations,channel_statistics);
602 (void) PrintChannelLocations(file,image,BlackChannel,
"Black",
603 statistic_type,max_locations,channel_statistics);
606 case LinearGRAYColorspace:
609 (void) PrintChannelLocations(file,image,GrayChannel,
"Gray",
610 statistic_type,max_locations,channel_statistics);
614 if (image->matte != MagickFalse)
615 (void) PrintChannelLocations(file,image,AlphaChannel,
"Alpha",
616 statistic_type,max_locations,channel_statistics);
619 exception=DestroyExceptionInfo(exception);
620 return(ferror(file) != 0 ? MagickFalse : MagickTrue);
623 elapsed_time=GetElapsedTime(&image->timer);
624 user_time=GetUserTime(&image->timer);
625 GetTimerInfo(&image->timer);
626 if (verbose == MagickFalse)
631 if (*image->magick_filename !=
'\0')
632 if (LocaleCompare(image->magick_filename,image->filename) != 0)
633 (void) FormatLocaleFile(file,
"%s=>",image->magick_filename);
634 if ((GetPreviousImageInList(image) == (
Image *) NULL) &&
635 (GetNextImageInList(image) == (
Image *) NULL) && (image->scene == 0))
636 (void) FormatLocaleFile(file,
"%s ",image->filename);
638 (
void) FormatLocaleFile(file,
"%s[%.20g] ",image->filename,(
double)
640 (void) FormatLocaleFile(file,
"%s ",image->magick);
641 if ((image->magick_columns != 0) || (image->magick_rows != 0))
642 if ((image->magick_columns != image->columns) ||
643 (image->magick_rows != image->rows))
644 (void) FormatLocaleFile(file,
"%.20gx%.20g=>",(
double)
645 image->magick_columns,(double) image->magick_rows);
646 (void) FormatLocaleFile(file,
"%.20gx%.20g ",(
double) image->columns,
647 (double) image->rows);
648 if ((image->page.width != 0) || (image->page.height != 0) ||
649 (image->page.x != 0) || (image->page.y != 0))
650 (void) FormatLocaleFile(file,
"%.20gx%.20g%+.20g%+.20g ",(
double)
651 image->page.width,(double) image->page.height,(
double) image->page.x,
652 (double) image->page.y);
653 (void) FormatLocaleFile(file,
"%.20g-bit ",(
double) image->depth);
654 if (image->type != UndefinedType)
655 (void) FormatLocaleFile(file,
"%s ",CommandOptionToMnemonic(
656 MagickTypeOptions,(ssize_t) image->type));
657 if (colorspace != UndefinedColorspace)
658 (void) FormatLocaleFile(file,
"%s ",CommandOptionToMnemonic(
659 MagickColorspaceOptions,(ssize_t) colorspace));
660 if (image->storage_class == DirectClass)
662 if (image->total_colors != 0)
664 (void) FormatMagickSize(image->total_colors,MagickFalse,format);
665 (void) FormatLocaleFile(file,
"%s ",format);
669 if (image->total_colors <= image->colors)
670 (void) FormatLocaleFile(file,
"%.20gc ",(
double) image->colors);
672 (
void) FormatLocaleFile(file,
"%.20g=>%.20gc ",(
double)
673 image->total_colors,(
double) image->colors);
674 if (image->error.mean_error_per_pixel != 0.0)
675 (void) FormatLocaleFile(file,
"%.20g/%f/%fdb ",(
double)
676 (image->error.mean_error_per_pixel+0.5),
677 image->error.normalized_mean_error,
678 image->error.normalized_maximum_error);
679 if (image->extent != 0)
681 (void) FormatMagickSize(image->extent,MagickTrue,format);
682 (void) FormatLocaleFile(file,
"%s ",format);
684 (void) FormatLocaleFile(file,
"%0.3fu %lu:%02lu.%03lu",user_time,
685 (
unsigned long) (elapsed_time/60.0),(
unsigned long) floor(fmod(
686 elapsed_time,60.0)),(
unsigned long) (1000.0*(elapsed_time-
687 floor(elapsed_time))));
688 (void) FormatLocaleFile(file,
"\n");
690 exception=DestroyExceptionInfo(exception);
691 return(ferror(file) != 0 ? MagickFalse : MagickTrue);
696 pixels=GetVirtualPixels(image,0,0,1,1,exception);
697 exception=DestroyExceptionInfo(exception);
698 ping=pixels == (
const PixelPacket *) NULL ? MagickTrue : MagickFalse;
699 exception=(&image->exception);
700 (void) SignatureImage(image);
706 if (ping == MagickFalse)
708 depth=GetImageDepth(image,exception);
709 channel_statistics=GetImageChannelStatistics(image,exception);
712 artifact=GetImageArtifact(image,
"identify:moments");
713 if (artifact != (
const char *) NULL)
715 channel_moments=GetImageChannelMoments(image,exception);
716 channel_phash=GetImageChannelPerceptualHash(image,exception);
718 artifact=GetImageArtifact(image,
"identify:features");
719 if (artifact != (
const char *) NULL)
721 distance=StringToUnsignedLong(artifact);
722 channel_features=GetImageChannelFeatures(image,distance,exception);
725 (void) FormatLocaleFile(file,
"Image:\n Filename: %s\n",image->filename);
726 if (*image->magick_filename !=
'\0')
727 if (LocaleCompare(image->magick_filename,image->filename) != 0)
730 filename[MaxTextExtent];
732 GetPathComponent(image->magick_filename,TailPath,filename);
733 (void) FormatLocaleFile(file,
" Base filename: %s\n",filename);
735 properties=(*GetBlobProperties(image));
736 if (properties.st_mode != 0)
738 static const char *rwx[] =
739 {
"---",
"--x",
"-w-",
"-wx",
"r--",
"r-x",
"rw-",
"rwx"};
740 (void) FormatLocaleFile(file,
" Permissions: %s%s%s\n",
741 rwx[(properties.st_mode >> 6) & 0x07],
742 rwx[(properties.st_mode >> 3) & 0x07],
743 rwx[(properties.st_mode >> 0) & 0x07]);
745 magick_info=GetMagickInfo(image->magick,exception);
746 if ((magick_info == (
const MagickInfo *) NULL) ||
747 (GetMagickDescription(magick_info) == (
const char *) NULL))
748 (void) FormatLocaleFile(file,
" Format: %s\n",image->magick);
750 (
void) FormatLocaleFile(file,
" Format: %s (%s)\n",image->magick,
751 GetMagickDescription(magick_info));
752 if ((magick_info != (
const MagickInfo *) NULL) &&
753 (GetMagickMimeType(magick_info) != (
const char *) NULL))
754 (void) FormatLocaleFile(file,
" Mime type: %s\n",GetMagickMimeType(
756 (void) FormatLocaleFile(file,
" Class: %s\n",CommandOptionToMnemonic(
757 MagickClassOptions,(ssize_t) image->storage_class));
758 (void) FormatLocaleFile(file,
" Geometry: %.20gx%.20g%+.20g%+.20g\n",(
double)
759 image->columns,(double) image->rows,(
double) image->tile_offset.x,(double)
760 image->tile_offset.y);
761 if ((image->magick_columns != 0) || (image->magick_rows != 0))
762 if ((image->magick_columns != image->columns) ||
763 (image->magick_rows != image->rows))
764 (void) FormatLocaleFile(file,
" Base geometry: %.20gx%.20g\n",(
double)
765 image->magick_columns,(double) image->magick_rows);
766 if ((image->x_resolution != 0.0) && (image->y_resolution != 0.0))
768 (void) FormatLocaleFile(file,
" Resolution: %gx%g\n",image->x_resolution,
769 image->y_resolution);
770 (void) FormatLocaleFile(file,
" Print size: %gx%g\n",(
double)
771 image->columns/image->x_resolution,(double) image->rows/
772 image->y_resolution);
774 (void) FormatLocaleFile(file,
" Units: %s\n",CommandOptionToMnemonic(
775 MagickResolutionOptions,(ssize_t) image->units));
776 (void) FormatLocaleFile(file,
" Colorspace: %s\n",CommandOptionToMnemonic(
777 MagickColorspaceOptions,(ssize_t) colorspace));
778 type=IdentifyImageType(image,exception);
779 (void) FormatLocaleFile(file,
" Type: %s\n",CommandOptionToMnemonic(
780 MagickTypeOptions,(ssize_t) type));
781 if (image->type != type)
782 (void) FormatLocaleFile(file,
" Base type: %s\n",CommandOptionToMnemonic(
783 MagickTypeOptions,(ssize_t) image->type));
784 (void) FormatLocaleFile(file,
" Endianness: %s\n",CommandOptionToMnemonic(
785 MagickEndianOptions,(ssize_t) image->endian));
788 if (image->depth == depth)
789 (void) FormatLocaleFile(file,
" Depth: %.20g-bit\n",(
double)
792 (
void) FormatLocaleFile(file,
" Depth: %.20g/%.20g-bit\n",(
double)
793 image->depth,(
double) depth);
800 (void) FormatLocaleFile(file,
" Channel depth:\n");
806 (void) FormatLocaleFile(file,
" red: %.20g-bit\n",(
double)
807 channel_statistics[RedChannel].depth);
808 (void) FormatLocaleFile(file,
" green: %.20g-bit\n",(
double)
809 channel_statistics[GreenChannel].depth);
810 (void) FormatLocaleFile(file,
" blue: %.20g-bit\n",(
double)
811 channel_statistics[BlueChannel].depth);
816 (void) FormatLocaleFile(file,
" cyan: %.20g-bit\n",(
double)
817 channel_statistics[CyanChannel].depth);
818 (void) FormatLocaleFile(file,
" magenta: %.20g-bit\n",(
double)
819 channel_statistics[MagentaChannel].depth);
820 (void) FormatLocaleFile(file,
" yellow: %.20g-bit\n",(
double)
821 channel_statistics[YellowChannel].depth);
822 (void) FormatLocaleFile(file,
" black: %.20g-bit\n",(
double)
823 channel_statistics[BlackChannel].depth);
826 case LinearGRAYColorspace:
829 (void) FormatLocaleFile(file,
" gray: %.20g-bit\n",(
double)
830 channel_statistics[GrayChannel].depth);
834 if (image->matte != MagickFalse)
835 (void) FormatLocaleFile(file,
" alpha: %.20g-bit\n",(
double)
836 channel_statistics[OpacityChannel].depth);
838 if (image->depth <= MAGICKCORE_QUANTUM_DEPTH)
839 scale=(double) QuantumRange/((
size_t) QuantumRange >> ((size_t)
840 MAGICKCORE_QUANTUM_DEPTH-image->depth));
841 (void) FormatLocaleFile(file,
" Channel statistics:\n");
842 (void) FormatLocaleFile(file,
" Pixels: %.20g\n",(
double)
843 image->columns*image->rows);
849 (void) PrintChannelStatistics(file,RedChannel,
"Red",1.0/scale,
851 (void) PrintChannelStatistics(file,GreenChannel,
"Green",1.0/scale,
853 (void) PrintChannelStatistics(file,BlueChannel,
"Blue",1.0/scale,
859 (void) PrintChannelStatistics(file,CyanChannel,
"Cyan",1.0/scale,
861 (void) PrintChannelStatistics(file,MagentaChannel,
"Magenta",1.0/scale,
863 (void) PrintChannelStatistics(file,YellowChannel,
"Yellow",1.0/scale,
865 (void) PrintChannelStatistics(file,BlackChannel,
"Black",1.0/scale,
869 case LinearGRAYColorspace:
872 (void) PrintChannelStatistics(file,GrayChannel,
"Gray",1.0/scale,
877 if (image->matte != MagickFalse)
878 (void) PrintChannelStatistics(file,AlphaChannel,
"Alpha",1.0/scale,
880 if ((colorspace != LinearGRAYColorspace) && (colorspace != GRAYColorspace))
882 (void) FormatLocaleFile(file,
" Image statistics:\n");
883 (void) PrintChannelStatistics(file,CompositeChannels,
"Overall",1.0/
884 scale,channel_statistics);
891 scale=(double) ((1UL << image->depth)-1);
892 (void) FormatLocaleFile(file,
" Channel moments:\n");
898 (void) PrintChannelMoments(file,RedChannel,
"Red",scale,
900 (void) PrintChannelMoments(file,GreenChannel,
"Green",scale,
902 (void) PrintChannelMoments(file,BlueChannel,
"Blue",scale,
908 (void) PrintChannelMoments(file,CyanChannel,
"Cyan",scale,
910 (void) PrintChannelMoments(file,MagentaChannel,
"Magenta",scale,
912 (void) PrintChannelMoments(file,YellowChannel,
"Yellow",scale,
914 (void) PrintChannelMoments(file,BlackChannel,
"Black",scale,
918 case LinearGRAYColorspace:
921 (void) PrintChannelMoments(file,GrayChannel,
"Gray",scale,
926 if (image->matte != MagickFalse)
927 (void) PrintChannelMoments(file,AlphaChannel,
"Alpha",scale,
929 if ((colorspace != LinearGRAYColorspace) && (colorspace != GRAYColorspace))
931 (void) FormatLocaleFile(file,
" Image moments:\n");
932 (void) PrintChannelMoments(file,CompositeChannels,
"Overall",scale,
940 (void) FormatLocaleFile(file,
" Channel perceptual hash:\n");
941 (void) PrintChannelPerceptualHash(file,RedChannel,
"Red, Hue",
943 (void) PrintChannelPerceptualHash(file,GreenChannel,
"Green, Chroma",
945 (void) PrintChannelPerceptualHash(file,BlueChannel,
"Blue, Luma",
947 if (image->matte != MagickFalse)
948 (void) PrintChannelPerceptualHash(file,AlphaChannel,
"Alpha, Alpha",
955 (void) FormatLocaleFile(file,
" Channel features (horizontal, vertical, "
956 "left and right diagonals, average):\n");
962 (void) PrintChannelFeatures(file,RedChannel,
"Red",channel_features);
963 (void) PrintChannelFeatures(file,GreenChannel,
"Green",
965 (void) PrintChannelFeatures(file,BlueChannel,
"Blue",channel_features);
970 (void) PrintChannelFeatures(file,CyanChannel,
"Cyan",channel_features);
971 (void) PrintChannelFeatures(file,MagentaChannel,
"Magenta",
973 (void) PrintChannelFeatures(file,YellowChannel,
"Yellow",
975 (void) PrintChannelFeatures(file,BlackChannel,
"Black",
979 case LinearGRAYColorspace:
982 (void) PrintChannelFeatures(file,GrayChannel,
"Gray",channel_features);
986 if (image->matte != MagickFalse)
987 (void) PrintChannelFeatures(file,AlphaChannel,
"Alpha",channel_features);
991 if (ping == MagickFalse)
993 if (colorspace == CMYKColorspace)
994 (void) FormatLocaleFile(file,
" Total ink density: %.*g%%\n",
995 GetMagickPrecision(),100.0*GetImageTotalInkDensity(image)/(double)
998 if (image->matte != MagickFalse)
1001 found = MagickFalse;
1010 indexes=(IndexPacket *) NULL;
1011 for (y=0; y < (ssize_t) image->rows; y++)
1013 p=GetVirtualPixels(image,0,y,image->columns,1,exception);
1016 indexes=GetVirtualIndexQueue(image);
1017 for (x=0; x < (ssize_t) image->columns; x++)
1019 if (GetPixelOpacity(p) == (Quantum) TransparentOpacity)
1026 if (found != MagickFalse)
1029 if (found != MagickFalse)
1032 tuple[MaxTextExtent];
1037 GetMagickPixelPacket(image,&pixel);
1038 SetMagickPixelPacket(image,p,indexes+x,&pixel);
1039 (void) QueryMagickColorname(image,&pixel,SVGCompliance,tuple,
1041 (void) FormatLocaleFile(file,
" Alpha: %s ",tuple);
1042 GetColorTuple(&pixel,MagickTrue,tuple);
1043 (void) FormatLocaleFile(file,
" %s\n",tuple);
1046 artifact=GetImageArtifact(image,
"identify:unique-colors");
1047 if (IsHistogramImage(image,exception) != MagickFalse)
1049 (void) FormatLocaleFile(file,
" Colors: %.20g\n",(
double)
1050 GetNumberColors(image,(FILE *) NULL,exception));
1051 (void) FormatLocaleFile(file,
" Histogram:\n");
1052 (void) GetNumberColors(image,file,exception);
1055 if ((artifact != (
const char *) NULL) &&
1056 (IsMagickTrue(artifact) != MagickFalse))
1057 (void) FormatLocaleFile(file,
" Colors: %.20g\n",(
double)
1058 GetNumberColors(image,(FILE *) NULL,exception));
1060 if (image->storage_class == PseudoClass)
1062 (void) FormatLocaleFile(file,
" Colormap entries: %.20g\n",(
double)
1064 (void) FormatLocaleFile(file,
" Colormap:\n");
1065 if (image->colors <= 1024)
1068 color[MaxTextExtent],
1070 tuple[MaxTextExtent];
1078 GetMagickPixelPacket(image,&pixel);
1080 for (i=0; i < (ssize_t) image->colors; i++)
1082 SetMagickPixelPacket(image,p,(IndexPacket *) NULL,&pixel);
1083 (void) CopyMagickString(tuple,
"(",MaxTextExtent);
1084 ConcatenateColorComponent(&pixel,RedChannel,X11Compliance,tuple);
1085 (void) ConcatenateMagickString(tuple,
",",MaxTextExtent);
1086 ConcatenateColorComponent(&pixel,GreenChannel,X11Compliance,tuple);
1087 (void) ConcatenateMagickString(tuple,
",",MaxTextExtent);
1088 ConcatenateColorComponent(&pixel,BlueChannel,X11Compliance,tuple);
1089 if (pixel.colorspace == CMYKColorspace)
1091 (void) ConcatenateMagickString(tuple,
",",MaxTextExtent);
1092 ConcatenateColorComponent(&pixel,IndexChannel,X11Compliance,
1095 if (pixel.matte != MagickFalse)
1097 (void) ConcatenateMagickString(tuple,
",",MaxTextExtent);
1098 ConcatenateColorComponent(&pixel,AlphaChannel,X11Compliance,
1101 (void) ConcatenateMagickString(tuple,
")",MaxTextExtent);
1102 (void) QueryMagickColorname(image,&pixel,SVGCompliance,color,
1104 GetColorTuple(&pixel,MagickTrue,hex);
1105 (void) FormatLocaleFile(file,
" %g: %s %s %s\n",(
double) i,tuple,
1111 if (image->error.mean_error_per_pixel != 0.0)
1112 (void) FormatLocaleFile(file,
" Mean error per pixel: %g\n",
1113 image->error.mean_error_per_pixel);
1114 if (image->error.normalized_mean_error != 0.0)
1115 (void) FormatLocaleFile(file,
" Normalized mean error: %g\n",
1116 image->error.normalized_mean_error);
1117 if (image->error.normalized_maximum_error != 0.0)
1118 (void) FormatLocaleFile(file,
" Normalized maximum error: %g\n",
1119 image->error.normalized_maximum_error);
1120 (void) FormatLocaleFile(file,
" Rendering intent: %s\n",
1121 CommandOptionToMnemonic(MagickIntentOptions,(ssize_t)
1122 image->rendering_intent));
1123 if (image->gamma != 0.0)
1124 (void) FormatLocaleFile(file,
" Gamma: %g\n",image->gamma);
1125 if ((image->chromaticity.red_primary.x != 0.0) ||
1126 (image->chromaticity.green_primary.x != 0.0) ||
1127 (image->chromaticity.blue_primary.x != 0.0) ||
1128 (image->chromaticity.white_point.x != 0.0))
1133 (void) FormatLocaleFile(file,
" Chromaticity:\n");
1134 (void) FormatLocaleFile(file,
" red primary: (%g,%g,%g)\n",
1135 image->chromaticity.red_primary.x,image->chromaticity.red_primary.y,
1136 image->chromaticity.red_primary.z);
1137 (void) FormatLocaleFile(file,
" green primary: (%g,%g,%g)\n",
1138 image->chromaticity.green_primary.x,image->chromaticity.green_primary.y,
1139 image->chromaticity.green_primary.z);
1140 (void) FormatLocaleFile(file,
" blue primary: (%g,%g,%g)\n",
1141 image->chromaticity.blue_primary.x,image->chromaticity.blue_primary.y,
1142 image->chromaticity.blue_primary.z);
1143 (void) FormatLocaleFile(file,
" white point: (%g,%g,%g)\n",
1144 image->chromaticity.white_point.x,image->chromaticity.white_point.y,
1145 image->chromaticity.white_point.z);
1147 if ((image->extract_info.width*image->extract_info.height) != 0)
1148 (
void) FormatLocaleFile(file,
" Tile geometry: %.20gx%.20g%+.20g%+.20g\n",
1149 (
double) image->extract_info.width,(
double) image->extract_info.height,
1150 (
double) image->extract_info.x,(
double) image->extract_info.y);
1151 (void) QueryColorname(image,&image->background_color,SVGCompliance,color,
1153 (void) FormatLocaleFile(file,
" Background color: %s\n",color);
1154 (void) QueryColorname(image,&image->border_color,SVGCompliance,color,
1156 (void) FormatLocaleFile(file,
" Border color: %s\n",color);
1157 (void) QueryColorname(image,&image->matte_color,SVGCompliance,color,
1159 (void) FormatLocaleFile(file,
" Matte color: %s\n",color);
1160 (void) QueryColorname(image,&image->transparent_color,SVGCompliance,color,
1162 (void) FormatLocaleFile(file,
" Transparent color: %s\n",color);
1163 (void) FormatLocaleFile(file,
" Interlace: %s\n",CommandOptionToMnemonic(
1164 MagickInterlaceOptions,(ssize_t) image->interlace));
1165 (void) FormatLocaleFile(file,
" Intensity: %s\n",CommandOptionToMnemonic(
1166 MagickPixelIntensityOptions,(ssize_t) image->intensity));
1167 (void) FormatLocaleFile(file,
" Compose: %s\n",CommandOptionToMnemonic(
1168 MagickComposeOptions,(ssize_t) image->compose));
1169 if ((image->page.width != 0) || (image->page.height != 0) ||
1170 (image->page.x != 0) || (image->page.y != 0))
1171 (void) FormatLocaleFile(file,
" Page geometry: %.20gx%.20g%+.20g%+.20g\n",
1172 (
double) image->page.width,(double) image->page.height,(
double)
1173 image->page.x,(double) image->page.y);
1174 if ((image->page.x != 0) || (image->page.y != 0))
1175 (void) FormatLocaleFile(file,
" Origin geometry: %+.20g%+.20g\n",(
double)
1176 image->page.x,(double) image->page.y);
1177 (void) FormatLocaleFile(file,
" Dispose: %s\n",CommandOptionToMnemonic(
1178 MagickDisposeOptions,(ssize_t) image->dispose));
1179 if (image->delay != 0)
1180 (void) FormatLocaleFile(file,
" Delay: %.20gx%.20g\n",(
double) image->delay,
1181 (double) image->ticks_per_second);
1182 if (image->iterations != 1)
1183 (void) FormatLocaleFile(file,
" Iterations: %.20g\n",(
double)
1185 if (image->duration != 0)
1186 (void) FormatLocaleFile(file,
" Duration: %.20g\n",(
double)
1188 if ((image->next != (
Image *) NULL) || (image->previous != (
Image *) NULL))
1189 (void) FormatLocaleFile(file,
" Scene: %.20g of %.20g\n",(
double)
1190 image->scene,(double) GetImageListLength(image));
1192 if (image->scene != 0)
1193 (void) FormatLocaleFile(file,
" Scene: %.20g\n",(
double) image->scene);
1194 (void) FormatLocaleFile(file,
" Compression: %s\n",CommandOptionToMnemonic(
1195 MagickCompressOptions,(ssize_t) image->compression));
1196 if (image->quality != UndefinedCompressionQuality)
1197 (void) FormatLocaleFile(file,
" Quality: %.20g\n",(
double) image->quality);
1198 (void) FormatLocaleFile(file,
" Orientation: %s\n",CommandOptionToMnemonic(
1199 MagickOrientationOptions,(ssize_t) image->orientation));
1200 if (image->montage != (
char *) NULL)
1201 (
void) FormatLocaleFile(file,
" Montage: %s\n",image->montage);
1202 if (image->directory != (
char *) NULL)
1220 image_info=AcquireImageInfo();
1221 (void) CloneString(&image_info->size,
"64x64");
1222 (void) FormatLocaleFile(file,
" Directory:\n");
1223 for (p=image->directory; *p !=
'\0'; p++)
1226 while ((*q !=
'\xff') && (*q !=
'\0') &&
1227 ((
size_t) (q-p) <
sizeof(image_info->filename)))
1229 (void) CopyMagickString(image_info->filename,p,(
size_t) (q-p+1));
1231 (void) FormatLocaleFile(file,
" %s",image_info->filename);
1232 handler=SetWarningHandler((WarningHandler) NULL);
1233 tile=ReadImage(image_info,exception);
1234 (void) SetWarningHandler(handler);
1235 if (tile == (
Image *) NULL)
1237 (void) FormatLocaleFile(file,
"\n");
1240 (void) FormatLocaleFile(file,
" %.20gx%.20g %s\n",(
double)
1241 tile->magick_columns,(double) tile->magick_rows,tile->magick);
1242 (void) SignatureImage(tile);
1243 ResetImagePropertyIterator(tile);
1244 property=GetNextImageProperty(tile);
1245 while (property != (
const char *) NULL)
1247 (void) FormatLocaleFile(file,
" %s:\n",property);
1248 value=GetImageProperty(tile,property);
1249 if (value != (
const char *) NULL)
1250 (void) FormatLocaleFile(file,
"%s\n",value);
1251 property=GetNextImageProperty(tile);
1253 tile=DestroyImage(tile);
1255 image_info=DestroyImageInfo(image_info);
1257 (void) FormatLocaleString(key,MaxTextExtent,
"8BIM:1999,2998:#1");
1258 value=GetImageProperty(image,key);
1259 if (value != (
const char *) NULL)
1264 (void) FormatLocaleFile(file,
" Clipping path: ");
1265 if (strlen(value) > 80)
1266 (
void) fputc(
'\n',file);
1267 (void) FormatLocaleFile(file,
"%s\n",value);
1269 ResetImageProfileIterator(image);
1270 name=GetNextImageProfile(image);
1271 if (name != (
char *) NULL)
1279 (void) FormatLocaleFile(file,
" Profiles:\n");
1280 while (name != (
char *) NULL)
1282 profile=GetImageProfile(image,name);
1285 (void) FormatLocaleFile(file,
" Profile-%s: %.20g bytes\n",name,
1286 (
double) GetStringInfoLength(profile));
1287 if (LocaleCompare(name,
"iptc") == 0)
1308 profile_length=GetStringInfoLength(profile);
1309 for (i=0; i < (ssize_t) profile_length-5; i+=(ssize_t) length)
1312 sentinel=GetStringInfoDatum(profile)[i++];
1313 if (sentinel != 0x1c)
1315 dataset=GetStringInfoDatum(profile)[i++];
1316 record=GetStringInfoDatum(profile)[i++];
1319 case 5: tag=
"Image Name";
break;
1320 case 7: tag=
"Edit Status";
break;
1321 case 10: tag=
"Priority";
break;
1322 case 15: tag=
"Category";
break;
1323 case 20: tag=
"Supplemental Category";
break;
1324 case 22: tag=
"Fixture Identifier";
break;
1325 case 25: tag=
"Keyword";
break;
1326 case 30: tag=
"Release Date";
break;
1327 case 35: tag=
"Release Time";
break;
1328 case 40: tag=
"Special Instructions";
break;
1329 case 45: tag=
"Reference Service";
break;
1330 case 47: tag=
"Reference Date";
break;
1331 case 50: tag=
"Reference Number";
break;
1332 case 55: tag=
"Created Date";
break;
1333 case 60: tag=
"Created Time";
break;
1334 case 65: tag=
"Originating Program";
break;
1335 case 70: tag=
"Program Version";
break;
1336 case 75: tag=
"Object Cycle";
break;
1337 case 80: tag=
"Byline";
break;
1338 case 85: tag=
"Byline Title";
break;
1339 case 90: tag=
"City";
break;
1340 case 92: tag=
"Sub-Location";
break;
1341 case 95: tag=
"Province State";
break;
1342 case 100: tag=
"Country Code";
break;
1343 case 101: tag=
"Country";
break;
1344 case 103: tag=
"Original Transmission Reference";
break;
1345 case 105: tag=
"Headline";
break;
1346 case 110: tag=
"Credit";
break;
1347 case 115: tag=
"Src";
break;
1348 case 116: tag=
"Copyright String";
break;
1349 case 120: tag=
"Caption";
break;
1350 case 121: tag=
"Local Caption";
break;
1351 case 122: tag=
"Caption Writer";
break;
1352 case 200: tag=
"Custom Field 1";
break;
1353 case 201: tag=
"Custom Field 2";
break;
1354 case 202: tag=
"Custom Field 3";
break;
1355 case 203: tag=
"Custom Field 4";
break;
1356 case 204: tag=
"Custom Field 5";
break;
1357 case 205: tag=
"Custom Field 6";
break;
1358 case 206: tag=
"Custom Field 7";
break;
1359 case 207: tag=
"Custom Field 8";
break;
1360 case 208: tag=
"Custom Field 9";
break;
1361 case 209: tag=
"Custom Field 10";
break;
1362 case 210: tag=
"Custom Field 11";
break;
1363 case 211: tag=
"Custom Field 12";
break;
1364 case 212: tag=
"Custom Field 13";
break;
1365 case 213: tag=
"Custom Field 14";
break;
1366 case 214: tag=
"Custom Field 15";
break;
1367 case 215: tag=
"Custom Field 16";
break;
1368 case 216: tag=
"Custom Field 17";
break;
1369 case 217: tag=
"Custom Field 18";
break;
1370 case 218: tag=
"Custom Field 19";
break;
1371 case 219: tag=
"Custom Field 20";
break;
1372 default: tag=
"unknown";
break;
1374 (void) FormatLocaleFile(file,
" %s[%.20g,%.20g]: ",tag,
1375 (
double) dataset,(double) record);
1376 length=(size_t) (GetStringInfoDatum(profile)[i++] << 8);
1377 length|=GetStringInfoDatum(profile)[i++];
1378 length=MagickMin(length,profile_length-i);
1379 attribute=(
char *) NULL;
1380 if (~length >= (MaxTextExtent-1))
1381 attribute=(
char *) AcquireQuantumMemory(length+
1382 MaxTextExtent,
sizeof(*attribute));
1383 if (attribute != (
char *) NULL)
1385 (void) CopyMagickString(attribute,(
char *)
1386 GetStringInfoDatum(profile)+i,length+1);
1387 attribute_list=StringToList(attribute);
1388 if (attribute_list != (
char **) NULL)
1390 for (j=0; attribute_list[j] != (
char *) NULL; j++)
1392 (void) fputs(attribute_list[j],file);
1393 (void) fputs(
"\n",file);
1394 attribute_list[j]=(
char *) RelinquishMagickMemory(
1397 attribute_list=(
char **) RelinquishMagickMemory(
1400 attribute=DestroyString(attribute);
1404 if (image->debug != MagickFalse)
1405 PrintStringInfo(file,name,profile);
1406 name=GetNextImageProfile(image);
1409 ResetImagePropertyIterator(image);
1410 property=GetNextImageProperty(image);
1411 if (property != (
const char *) NULL)
1416 (void) FormatLocaleFile(file,
" Properties:\n");
1417 while (property != (
const char *) NULL)
1419 (void) FormatLocaleFile(file,
" %s: ",property);
1420 value=GetImageProperty(image,property);
1421 if (value != (
const char *) NULL)
1422 (void) FormatLocaleFile(file,
"%s\n",value);
1423 property=GetNextImageProperty(image);
1426 ResetImageArtifactIterator(image);
1427 artifact=GetNextImageArtifact(image);
1428 if (artifact != (
const char *) NULL)
1433 (void) FormatLocaleFile(file,
" Artifacts:\n");
1434 while (artifact != (
const char *) NULL)
1436 (void) FormatLocaleFile(file,
" %s: ",artifact);
1437 value=GetImageArtifact(image,artifact);
1438 if (value != (
const char *) NULL)
1439 (void) FormatLocaleFile(file,
"%s\n",value);
1440 artifact=GetNextImageArtifact(image);
1443 ResetImageRegistryIterator();
1444 registry=GetNextImageRegistry();
1445 if (registry != (
const char *) NULL)
1450 (void) FormatLocaleFile(file,
" Registry:\n");
1451 while (registry != (
const char *) NULL)
1453 (void) FormatLocaleFile(file,
" %s: ",registry);
1454 value=(
const char *) GetImageRegistry(StringRegistryType,registry,
1456 if (value != (
const char *) NULL)
1457 (
void) FormatLocaleFile(file,
"%s\n",value);
1458 registry=GetNextImageRegistry();
1461 (void) FormatLocaleFile(file,
" Tainted: %s\n",CommandOptionToMnemonic(
1462 MagickBooleanOptions,(ssize_t) image->taint));
1463 (void) FormatMagickSize(image->extent,MagickTrue,format);
1464 (void) FormatLocaleFile(file,
" Filesize: %s\n",format);
1465 (void) FormatMagickSize((MagickSizeType) image->columns*image->rows,
1466 MagickFalse,format);
1467 if (strlen(format) > 1)
1468 format[strlen(format)-1]=
'\0';
1469 (void) FormatLocaleFile(file,
" Number pixels: %s\n",format);
1470 if (elapsed_time > MagickEpsilon)
1472 (void) FormatMagickSize((MagickSizeType) ((double) image->columns*
1473 image->rows/elapsed_time+0.5),MagickFalse,format);
1474 (void) FormatLocaleFile(file,
" Pixels per second: %s\n",format);
1476 (void) GetMagickUTCTime(&image->timestamp,×tamp);
1477 (void) strftime(iso8601,
sizeof(iso8601),
"%FT%TZ",×tamp);
1479 if (IsImageTTLExpired(image) != MagickFalse)
1481 (void) FormatLocaleFile(file,
" Time-to-live: %g:%g:%g:%g%c %s\n",
1482 (
double) (image->ttl/(3600*24)),(double) ((image->ttl % (24*3600))/3600),
1483 (double) ((image->ttl % 3600)/60),(
double) ((image->ttl % 3600) % 60),
1485 (void) FormatLocaleFile(file,
" User time: %0.3fu\n",user_time);
1486 (void) FormatLocaleFile(file,
" Elapsed time: %lu:%02lu.%03lu\n",
1487 (
unsigned long) (elapsed_time/60.0),(
unsigned long) ceil(fmod(
1488 elapsed_time,60.0)),(
unsigned long) (1000.0*(elapsed_time-floor(
1490 (void) FormatLocaleFile(file,
" Version: %s\n",GetMagickVersion((
size_t *)
1492 (void) fflush(file);
1493 return(ferror(file) != 0 ? MagickFalse : MagickTrue);