Page 1 of 1
Magick++ adding IsImageSimilar to functionality
Posted: 2010-02-10T06:26:33-07:00
by Explosion_Of_Colour
Afternoon folks,
I'm just trying to work out how I can wrap the IsImageSimilar method from the MagickCore for use in Magick++ - my C++ and C skills are limited but I'm learning as I go! Is it possible to wrap this method or is there limitations to what can be used from the C++ side?
Thanks very much,
Becky
Re: Magick++ adding IsImageSimilar to functionality
Posted: 2010-02-10T08:10:57-07:00
by magick
You should be able to access any MagickCore method with the Magick++ MagickCore namespace. Use MagickCore::IsImageSimilar(). However, have you tried the Magick++ method compare():
- // Compare current image with another image
// Sets meanErrorPerPixel, normalizedMaxError, and normalizedMeanError
// in the current image. False is returned if the images are identical.
bool Magick::Image::compare ( const Image &reference_ )
Re: Magick++ adding IsImageSimilar to functionality
Posted: 2010-02-10T08:22:19-07:00
by Explosion_Of_Colour
Ah I hadn't thought of trying that one - is there a difference in functionality or is it simply are the images identical? true/false?
Re: Magick++ adding IsImageSimilar to functionality
Posted: 2010-02-11T04:26:52-07:00
by Explosion_Of_Colour
Hmmm, on second thoughts I'm not sure the Compare method will do what I want, as I can't pass x and y values as offsets; which is assume in IsImageSimilar are updated with the values of the similar position. Is Magick++ Visual C++ compatible or will I need to use gcc?
Thanks,
Becky