Command Line Statement to Magickcore Code

The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
Post Reply
8ifhv
Posts: 3
Joined: 2013-10-27T20:38:00-07:00
Authentication code: 6789

Command Line Statement to Magickcore Code

Post by 8ifhv »

Can someone help me convert this command line statement to magickcore C code:

"compare -metric RMSE image.jpg image2.jpg NULL 2>&1"

I believe I should use CompareImageChannels()?
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Command Line Statement to Magickcore Code

Post by dlemstra »

You are better of using GetImageChannelDistortion with MetricType=RootMeanSquaredErrorMetric
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
8ifhv
Posts: 3
Joined: 2013-10-27T20:38:00-07:00
Authentication code: 6789

Re: Command Line Statement to Magickcore Code

Post by 8ifhv »

I'm having trouble getting MagickCore working.

Here's the details with the issue:

http://stackoverflow.com/questions/1987 ... tion-error
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Command Line Statement to Magickcore Code

Post by magick »

Code: Select all

double distortion;
aaaa = GetImageChannelDistortion(base_image, reference_image, channel, metric, &distortion, exception);
8ifhv
Posts: 3
Joined: 2013-10-27T20:38:00-07:00
Authentication code: 6789

Re: Command Line Statement to Magickcore Code

Post by 8ifhv »

Worked. Thanks for the help!
Post Reply