Hi
I want to compare 2 images and display the difference in VBA.
How do i write the code?
Thank you.
Compare Images in VBA
Re: Compare Images in VBA
Use ImageMagickObject. It includes a Compare() method to compare two images.
Re: Compare Images in VBA
I tried to input the command line " $ compare -compose src StudPath RefPath difference.png" but received a syntax error.
I am trying to compare 2 images and the difference is saved as another image. Is this possible?
I tried another way of writing, (RefPath/StudPath is the path of my image)
Dim VarName As New MagickImage
Dim compare As Image
VarName.compare , RefPath, StudPath, compare.jpg
but received an error which says" Object variable not set"
I am trying to compare 2 images and the difference is saved as another image. Is this possible?
I tried another way of writing, (RefPath/StudPath is the path of my image)
Dim VarName As New MagickImage
Dim compare As Image
VarName.compare , RefPath, StudPath, compare.jpg
but received an error which says" Object variable not set"
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
- Contact:
Re: Compare Images in VBA
try just
compare -metric rmse image1 image2 null:
if the two images are the same size.
compare -metric rmse image1 image2 null:
if the two images are the same size.
Re: Compare Images in VBA
rmse is highlighted and an error shows up which reads "Complie Error, Expected: End of Statement"fmw42 wrote:try just
compare -metric rmse image1 image2 null:
if the two images are the same size.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
- Contact:
Re: Compare Images in VBA
try
compare -metric rmse rose: rose: null:
change the rmse to any other metric. If these fail, then you have a problem with your IM install or you have some other compare function on your system and need to rename the IM compare.
see
http://www.imagemagick.org/Usage/compare/#statistics
compare -metric rmse rose: rose: null:
change the rmse to any other metric. If these fail, then you have a problem with your IM install or you have some other compare function on your system and need to rename the IM compare.
see
http://www.imagemagick.org/Usage/compare/#statistics
Re: Compare Images in VBA
Failed again.
I am writing in VBA, do i have to change the way in writing the command line? (declare IM etc.)
I am writing in VBA, do i have to change the way in writing the command line? (declare IM etc.)
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
- Contact:
Re: Compare Images in VBA
You may have to provide the full path to compare when using any scripting system such as VBA, Applescript, PHP exec(), etc
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 27 guests