Version: ImageMagick 7.0.7-28
I need to compare 2 png files. And a file needs to chop an edge.
convert base.png -gravity EAST -chop 6x0 base.png
compare -metric AE clean.png base.png result.png
I would like to combine into one command line:
compare -metric AE clean.png \( base.png -gravity EAST -chop 6x0 \) result.png
But get error:
compare: unrecognized option `-chop'
I was using -crop and it worked without problem. So I thought changing to -chop should be no problem.
command line help
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: command line help
compare does not allow such. But you can use convert
See https://imagemagick.org/script/command- ... hp#compare
Code: Select all
magick clean.png \( base.png -gravity EAST -chop 6x0 \) -metric AE -compare +write result.png -format "%[distortion]" info:
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: command line help
P.S. You can request that -chop be added to compare in the Developers Forum. But that may or may not get done quickly.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: command line help
Also note that for IM 7, it would be magick compare and not just compare. compare alone is for IM 6.
See https://imagemagick.org/script/porting.php#cli
See https://imagemagick.org/script/porting.php#cli
Re: command line help
Thanks.
This works.
And thanks again.
This works.
And thanks again.