What does the "-compare" option do?

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

Moderators: XnTriq, xnview

Post Reply
User avatar
XnTriq
Moderator & Librarian
Posts: 5708
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: 35454
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

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: 5708
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: 35454
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

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: 5708
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!

www.cambridgeincolour.com/tutorials/bit-depth.htm
www.cambridgeincolour.com/tutorials/bit-depth.htm
test.png (72.62 KiB) Viewed 585 times
nconvert.exe -out jpeg -q 100 -opthuff -dct 2 -smoothingf 0 -subsampling 2 -o test.jpg test.png
nconvert.exe -out jpeg -q 100 -opthuff -dct 2 -smoothingf 0 -subsampling 2 -o test.jpg test.png
test.jpg (94.87 KiB) Viewed 585 times
nconvert.exe -compare test.jpg red test.png
nconvert.exe -compare test.jpg red test.png
nconvert_red.png (91.46 KiB) Viewed 585 times
nconvert.exe -compare test.jpg red_only test.png
nconvert.exe -compare test.jpg red_only test.png
nconvert_redonly.png (41.61 KiB) Viewed 585 times
www.softpedia.com/get/Multimedia/Graphic/Graphic-Others/ImageDiff.shtml
www.softpedia.com/get/Multimedia/Graphic/Graphic-Others/ImageDiff.shtml
imagediff.png (18.93 KiB) Viewed 585 times
Post Reply