ThrowImageException;
}
-bool Magick::Image::compare(const Image &reference_)
+bool Magick::Image::compare(const Image &reference_) const
{
bool
status;
ref=reference_;
GetPPException;
- modifyImage();
- status=static_cast<bool>(IsImagesEqual(image(),ref.constImage(),
+ status=static_cast<bool>(IsImagesEqual(constImage(),ref.constImage(),
exceptionInfo));
ThrowImageException;
return(status);
ThrowImageException;
}
+bool Magick::Image::setColorMetric(const Image &reference_)
+{
+ bool
+ status;
+
+ Image
+ ref=reference_;
+
+ GetPPException;
+ modifyImage();
+ status=static_cast<bool>(SetImageColorMetric(image(),ref.constImage(),
+ exceptionInfo));
+ ThrowImageException;
+ return(status);
+}
+
Magick::Quantum *Magick::Image::setPixels(const ssize_t x_,const ssize_t y_,
const size_t columns_,const size_t rows_)
{
void colorMatrix(const size_t order_,const double *color_matrix_);
// Compare current image with another image
- // Sets meanErrorPerPixel, normalizedMaxError, and normalizedMeanError
- // in the current image. False is returned if the images are identical.
- bool compare(const Image &reference_);
+ // False is returned if the images are not identical.
+ bool compare(const Image &reference_) const;
// Compare current image with another image
// Returns the distortion based on the specified metric.
// A threshold of 80% is a good starting point for a reasonable tone.
void sepiaTone(const double threshold_);
+ // Sets meanErrorPerPixel, normalizedMaxError, and normalizedMeanError
+ // in the current image. False is returned if the images are not identical.
+ bool setColorMetric(const Image &reference_);
+
// Allocates a pixel cache region to store image pixels as defined
// by the region rectangle. This area is subsequently transferred
// from the pixel cache to the image via syncPixels.