JoelH Posted July 26, 2013 Posted July 26, 2013 (edited) Hello, I have successfully used the Image Magick object to convert an image into another format: Func _ImageMagick_Convert($infile, $outfile) local $o_object; local $rc; $o_object = ObjCreate("ImageMagickObject.MagickImage.1") If Not IsObj($o_object) Then Return 0 endif $rc = $o_object.Convert($infile, $outfile) Return 1 EndFunc I now wish to use Image Magick's compare functionality to obtain an 'overall image distortion'. I have found the code for this here: http://www.imagemagick.org/script/compare.php However, I am unable to get the code to work: Func _Compare_Image($fileOne, $fileTwo, $result) local $o_object; local $rc; $o_object = ObjCreate("ImageMagickObject.MagickImage.1") If Not IsObj($o_object) Then Return 0 endif $rc = $o_object.Compare("-metric", "PSNR", $fileOne, $fileTwo, $result) Return $rc EndFunc $test = Call("_Compare_Image", "Sample One.png", "Sample Two.png", "Result.png") ConsoleWrite($test) I am not sure how to pass the -metric PSNR method. Can anyone help? Edited July 26, 2013 by JoelH
CableGuy Posted November 20, 2013 Posted November 20, 2013 Did you already find a solution for your problem ?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now