2

I get the following error when I run the import command of ImageMagick from command-line

import: unable to open X sever '(null)'  @error /import.c/ImportImageCommand/362 [No such file or directory]

However, I have installed X-Server and it is launched in my task-bar. Even then I get this error.

Could you please provide me with some relevant links or solutions.

Pylsa
  • 31,383

2 Answers2

2

If the Windows magick works like the *nix one, then you can try setting DISPLAY environment variable prior to calling it, e.g.

set DISPLAY=localhost:0.0
import ...
Catherine
  • 16,610
0

Windows by default doesn't include an "X Server". You need to install one that is made for Windows first. And it must run when you start ImageMagick's display or import commands.

I would recommend to install the public domain version of the XMing package (documentation). Then, simply launch xlaunch.exe and confirm all default settings. This will get the X Server running on localhost:0.0. Once it runs, your ImageMagick commands import and display will work, at least if you call them like this:

 import -server localhost:0.0 ....
 display -server localhost:0.0 ....
Kurt Pfeifle
  • 13,079