Hi all,
Is there a possibility to use the tool 'compare' contained in the 'ImageMagick' through Switch tool 'Execute command'? I did some tests with the command line and it works well.
I don't know how to indicate two input files to be able perform the operation.
I would like to make it like this:
'Input folder (with files to compare)' -> compare -> output folder (with file comparison)
Thanks in advance,
Aleksander
Compare in ImageMagick
Compare in ImageMagick
Aleksander
Compare in ImageMagick
_olq wrote: I don't know how to indicate two input files to be able perform the operation.
I don't know much about ImageMagick apart from using the PHP library. But if you figure out how to specify the input files in command line, you could probably define some temporary files (or static ones on your filesystem) using the File class. Once those temporary paths are tied to a variable, I imagine you could pass that into ImageMagick. Hope that helps
I don't know much about ImageMagick apart from using the PHP library. But if you figure out how to specify the input files in command line, you could probably define some temporary files (or static ones on your filesystem) using the File class. Once those temporary paths are tied to a variable, I imagine you could pass that into ImageMagick. Hope that helps
Chat: open-automation @ gitter
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
Compare in ImageMagick
gabrielp wrote: you could probably define some temporary files (or static ones on your filesystem) using the File class. Once those temporary paths are tied to a variable, I imagine you could pass that into ImageMagick.
Hi Gabriel,
What you say makes sense, but I have no idea how to do it
Could you show an example?
Hi Gabriel,
What you say makes sense, but I have no idea how to do it

Could you show an example?
Aleksander
-
- TOP CONTRIBUTOR
- Posts: 628
- Joined: Mon Nov 29, 2010 8:45 pm
- Location: Alpharetta GA USA
- Contact:
Compare in ImageMagick
I wrote this configurator for Imagemagick's compare
https://www.dropbox.com/s/dihwpwv8d48ah ... cript?dl=0
Dwight Kelly
Apago, Inc.
https://www.dropbox.com/s/dihwpwv8d48ah ... cript?dl=0
Dwight Kelly
Apago, Inc.
Compare in ImageMagick
I'm pleasantly surprised, it works great.
Good job Dwight, thank you very much!
Good job Dwight, thank you very much!
Aleksander
Compare in ImageMagick
Maybe just one little question
Where should I add options to compare command?

Where should I add options to compare command?
Aleksander
-
- TOP CONTRIBUTOR
- Posts: 628
- Joined: Mon Nov 29, 2010 8:45 pm
- Location: Alpharetta GA USA
- Contact:
Compare in ImageMagick
Edit the script, find the lines that start with argv[argc++] and add or modify options.
Compare in ImageMagick
Thanks again Dwight,
I have some trouble with that.
When I'm adding an option with the existing I have error "Failed to run external process"
args[argc++] = appPath+" -metric AE -fuzz 5%";
args[argc++] = job.getPath()+"/"+entries[0];
args[argc++] = job.getPath()+"/"+entries[1];
args[argc++] = differenceFN;
If I'm adding separate, option has no effect
args[argc++] = appPath;
args[argc++] = " -metric AE -fuzz 5%";
args[argc++] = job.getPath()+"/"+entries[0];
args[argc++] = job.getPath()+"/"+entries[1];
args[argc++] = differenceFN;
Do you have any idea?
I have some trouble with that.
When I'm adding an option with the existing I have error "Failed to run external process"
args[argc++] = appPath+" -metric AE -fuzz 5%";
args[argc++] = job.getPath()+"/"+entries[0];
args[argc++] = job.getPath()+"/"+entries[1];
args[argc++] = differenceFN;
If I'm adding separate, option has no effect
args[argc++] = appPath;
args[argc++] = " -metric AE -fuzz 5%";
args[argc++] = job.getPath()+"/"+entries[0];
args[argc++] = job.getPath()+"/"+entries[1];
args[argc++] = differenceFN;
Do you have any idea?
Aleksander
-
- TOP CONTRIBUTOR
- Posts: 628
- Joined: Mon Nov 29, 2010 8:45 pm
- Location: Alpharetta GA USA
- Contact:
Compare in ImageMagick
Follow the pattern that is already there for arguments
args[argc++] = appPath;
args[argc++] = "-metric"; args[argc++] = "AE";
args[argc++] = "-fuzz"; args[argc++] = "5%";
args[argc++] = job.getPath()+"/"+entries[0];
args[argc++] = job.getPath()+"/"+entries[1];
args[argc++] = differenceFN;
args[argc++] = appPath;
args[argc++] = "-metric"; args[argc++] = "AE";
args[argc++] = "-fuzz"; args[argc++] = "5%";
args[argc++] = job.getPath()+"/"+entries[0];
args[argc++] = job.getPath()+"/"+entries[1];
args[argc++] = differenceFN;