1 module dmagick.c.compare; 2 3 import dmagick.c.exception; 4 import dmagick.c.geometry; 5 import dmagick.c.image; 6 import dmagick.c.magickType; 7 import dmagick.c.magickVersion; 8 9 extern(C) 10 { 11 enum MetricType 12 { 13 UndefinedMetric, 14 AbsoluteErrorMetric, 15 MeanAbsoluteErrorMetric, 16 MeanErrorPerPixelMetric, 17 MeanSquaredErrorMetric, 18 PeakAbsoluteErrorMetric, 19 PeakSignalToNoiseRatioMetric, 20 RootMeanSquaredErrorMetric, 21 NormalizedCrossCorrelationErrorMetric, 22 FuzzErrorMetric, 23 UndefinedErrorMetric = 0, 24 PerceptualHashErrorMetric = 0xff 25 } 26 27 double* GetImageChannelDistortions(Image*, const(Image)*, const MetricType, ExceptionInfo*); 28 29 Image* CompareImageChannels(Image*, const(Image)*, const ChannelType, const MetricType, double*, ExceptionInfo*); 30 Image* CompareImages(Image*, const(Image)*, const MetricType, double*, ExceptionInfo*); 31 Image* SimilarityImage(Image*, const(Image)*, RectangleInfo*, double*, ExceptionInfo*); 32 33 static if ( MagickLibVersion >= 0x674 ) 34 { 35 Image* SimilarityMetricImage(Image*, const(Image)*, const MetricType, RectangleInfo*, double*, ExceptionInfo*); 36 } 37 38 MagickBooleanType GetImageChannelDistortion(Image*, const(Image)*, const ChannelType, const MetricType, double*, ExceptionInfo*); 39 MagickBooleanType GetImageDistortion(Image*, const(Image)*, const MetricType, double*, ExceptionInfo*); 40 MagickBooleanType IsImagesEqual(Image*, const(Image)*); 41 }