Converting Magick::Image to MagickLib::Image?
Posted: 2009-04-14T20:43:44-07:00
I have seen this asked a few times in the forum, but no answer was every given that I can find...
How do you convert from a Magick::Image to a MagickLib::Image so you can do something like this?
How do you convert from a Magick::Image to a MagickLib::Image so you can do something like this?
Code: Select all
#define MAGICKCORE_IMPLEMENTATION 1
#include <Magick++.h>
using namespace Magick;
int main()
{
Image imagea;
Image imageb;
imagea.read("pic.png");
imageb.read("pic2.png");
double dist;
MagickLib::Image *imagec = MagickLib::CompareImages((MagickLib::Image *)&imagea, (MagickLib::Image *) &imageb, MagickLib::MeanSquaredErrorMetric, &dist, NULL);
printf("%f\n", dist);
return 0;
}