title: Running convert command of image magic using Java gives unable to load module error
body: <p>I have written a class that execute convert command of imagemagic.</p>
  
  <pre><code>public class ImageMagicDemo {
  
  public static void main(String[] argp){
  
  
      ProcessBuilder pb2 = new ProcessBuilder("G:\\project\\installation\\imagemagic\\convert","G:\\demo\\image\\frame.jpg", "-resize", "20x20",
              "G:\\demo\\image\\resizeImage\\frame1.jpg");
      pb2.redirectErrorStream(true);
  
      Process p2;
      try {
          p2 = pb2.start();
           BufferedReader br = new BufferedReader(new InputStreamReader(p2.getInputStream()));
              String line = null;
              while((line=br.readLine())!=null){
                  System.out.println(line);
              }
              System.out.println("2"+p2.waitFor());
  
      } catch (Exception e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
  
  }
  
  }
  </code></pre>
  
  <p>But I am getting the following response</p>
  
  <pre><code>convert.exe: unable to open image `G:\demo\image\frame.jpg': No such file or directory @ error/blob.c/OpenBlob/2692.
  convert.exe: unable to load module `G:\project\installation\imagemagic\modules\coders\IM_MOD_RL_JPEG_.dll': The specified module could not be found.
  @ error/module.c/OpenModule/1282.
  convert.exe: no decode delegate for this image format `JPG' @ error/constitute.c/ReadImage/501.
  convert.exe: no images defined `G:\demo\image\resizeImage\frame1.jpg' @ error/convert.c/ConvertImageCommand/3212.
  </code></pre>
  
  <p>Same problem is with .png file.I have installed ImageMagick-6.9.1-2-Q16-x64-dll.exe on Window8.
  However if I run the following command on command prompt </p>
  
  <pre><code>convert -resize 1024x768 G:\\demo\\image\\frame.jpg G:\\demo\\image\\resizeImage\\frame1.jpg
  </code></pre>
  
  <p>It successfully execute and copy the resized image in destination folder.If anyone knows please reply.</p>
  
  <p>Thanks </p>