Getting compare.exe: unable to open image x: error

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
manmanda
Posts: 17
Joined: 2014-04-16T13:34:38-07:00
Authentication code: 6789

Getting compare.exe: unable to open image x: error

Post by manmanda »

Hello,
I just started using ImageMagick software.
In my C drive myimages folder i have two images pic1.bmp and pic2.bmp
When i executed below command

C:\myimages>compare pic1.bmp pic2.bmp x:
compare.exe: unable to open image `x:': No such file or directory @ error/blob.c
/OpenBlob/2647.

Can you please let me know why i am getting this information?
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Getting compare.exe: unable to open image x: error

Post by Bonzo »

I have never used compare but I am wondering why are you putting x: at the end of your command?
I am sure x: should be an image; see a link to some compare examples
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Getting compare.exe: unable to open image x: error

Post by fmw42 »

I believe that x: along with show:, etc are for unix only and require X11 to work to display the result without saving the result to disk. You will need to specify an image name and save to disk.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Getting compare.exe: unable to open image x: error

Post by Bonzo »

I did wonder if it was something to do with an X server but as I do not have one I could not test it!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Getting compare.exe: unable to open image x: error

Post by fmw42 »

manmanda
Posts: 17
Joined: 2014-04-16T13:34:38-07:00
Authentication code: 6789

Re: Getting compare.exe: unable to open image x: error

Post by manmanda »

After reading all your replies i used below command and it works for me
command C:\myimages>compare pic1.bmp pic2.bmp show: to view it directly

Thanks for your help
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Getting compare.exe: unable to open image x: error

Post by fmw42 »

manmanda wrote:After reading all your replies i used below command and it works for me
command C:\myimages>compare pic1.bmp pic2.bmp show: to view it directly
I am very surprised that works. I thought show: was for unix only. But perhaps on Windows the delegates.xml file has that line set for some Windows-based viewer.

Also compare generally needs a -metric defined for it, though there may be a default, but I don't know which it is.

Code: Select all

compare -metric rmse pic1.bmp pic2.bmp diff.bmp
see
http://www.imagemagick.org/script/compare.php
http://www.imagemagick.org/Usage/compare/
Post Reply