What does the "-compare" option do?

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: XnTriq, helmut, xnview

User avatar
XnTriq
Moderator & Librarian
Posts: 6190
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

What does the "-compare" option do?

Post by XnTriq »

nconvert.exe -help wrote:

Code: Select all

-compare filename method : Compare with this image, method (red, red_only)
User avatar
xnview
Author of XnView
Posts: 40573
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: What does the "-compare" option do?

Post by xnview »

output pixels difference between 2 images (need to be same size)
Pierre.
User avatar
XnTriq
Moderator & Librarian
Posts: 6190
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: What does the "-compare" option do?

Post by XnTriq »

xnview wrote: Wed Feb 03, 2021 7:09 amoutput pixels difference between 2 images (need to be same size)
:-D I was hoping for something like this to be implemented, but I can't get it to work.

How do I tell nConvert to compare (the blue channels of) two images (original.png + edited.png)?

Code: Select all

nconvert.exe -compare edited.png original.png
Could you please give me an example illustrating the purpose of the method argument and what values (red/green/bue? red_only/green_only/blue_only/alpha_only?) are accepted as parameters?
User avatar
xnview
Author of XnView
Posts: 40573
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: What does the "-compare" option do?

Post by xnview »

you can try

Code: Select all

nconvert.exe -compare edited.png red original.png
only red/red_only as parameters
Pierre.
User avatar
XnTriq
Moderator & Librarian
Posts: 6190
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: What does the "-compare" option do?

Post by XnTriq »

xnview wrote: Wed Feb 03, 2021 10:39 amyou can try

Code: Select all

nconvert.exe -compare edited.png red original.png
only red/red_only as parameters
Thanks, Pierre!

test.png
test.jpg
nconvert_red.png
nconvert_redonly.png
imagediff.png
You do not have the required permissions to view the files attached to this post.