title: EPS reader java
body: <p>I downloaded the library for working with EPS files <a href="http://www.spectotechnologies.com/projets-ouverts/plugiciel-eps-pour-imageio" rel="nofollow noreferrer">here</a>.</p>
  
  <p>And wrote some code to parse EPS file:</p>
  
  <pre><code>EPSImageReaderSPI spi = new EPSImageReaderSPI();
  EPSImageReader eps = new EPSImageReader(spi);
  
  File file = new File("file.eps");
  InputStream in = null;
  try {
      in = new FileInputStream(file);
  } catch (FileNotFoundException e) {
      e.printStackTrace();  
  }
  ImageInputStream iis = null;
  iis = ImageIO.createImageInputStream(in);
  eps.setInput(iis);
  eps.getHeight(0);
  </code></pre>
  
  <p>My code crashes and saying:</p>
  
  <blockquote>
    <p>Exception in thread "main" javax.imageio.IIOException: Data type -1 not supported
        at epsLib.EPSImageReader.readHeader(EPSImageReader.java:307)
        at epsLib.EPSImageReader.getHeight(EPSImageReader.java:148)
        at Main.main(Main.java:39)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)</p>
  </blockquote>
  
  <p>Can you help me please?</p>
  
  <p><strong>UPDATED:</strong></p>
  
  <p>When I try to install <strong>jmagick</strong>, but when I run the command:</p>
  
  <pre><code>./configure --with-java-home=/System/Library/Frameworks/JavaVM.framework/Versions/Current --with-magick-home=/usr/local/Cellar/imagemagick/6.8.0-10 --with-magick-inc-dir=/usr/local/Cellar/imagemagick/6.8.0-10/include
  </code></pre>
  
  <p>Get this error:</p>
  
  <blockquote>
    <p>checking for MagickCore-config... /usr/local/Cellar/imagemagick/6.8.0-10/bin/MagickCore-config
        /usr/local/Cellar/imagemagick/6.8.0-10/bin/MagickCore-config: line 50: pkg-config: command not found
        /usr/local/Cellar/imagemagick/6.8.0-10/bin/MagickCore-config: line 53: pkg-config: command not found
        /usr/local/Cellar/imagemagick/6.8.0-10/bin/MagickCore-config: line 47: pkg-config: command not found
        checking magick/api.h usability... no
        checking magick/api.h presence... no
        checking for magick/api.h... no
        configure: error: Unable to find ImageMagick header files</p>
  </blockquote>
  
  <hr>
  
  <p><strong>UPDATED:</strong></p>
  
  <p>I fix it! Just change command to:</p>
  
  <pre><code>./configure --with-java-home=/System/Library/Frameworks/JavaVM.framework/Versions/Current --with-magick-home=/usr/local/Cellar/imagemagick/6.8.0-10 --with-magick-inc-dir=/usr/local/Cellar/imagemagick/6.8.0-10/include/ImageMagick/
  </code></pre>
  
  <p>Then I tried:</p>
  
  <pre><code>make all
  </code></pre>
  
  <p>And get error:</p>
  
  <blockquote>
    <p>make<a href="http://www.spectotechnologies.com/projets-ouverts/plugiciel-eps-pour-imageio" rel="nofollow noreferrer">1</a>: Entering directory <code>/Users/olegsuzaev/jmagick-6.4.0/src'make[2]: Entering directory</code>/Users/olegsuzaev/jmagick-6.4.0/src/magick'../../Make.rules:175: <strong>* missing separator.  Stop.
        make[2]: Leaving directory <code>/Users/olegsuzaev/jmagick-6.4.0/src/magick'
        make[1]: *** [dir_target] Error 2
        make[1]: Leaving directory</code>/Users/olegsuzaev/jmagick-6.4.0/src'
        make: *</strong> [dir_target] Error 2</p>
  </blockquote>
  
  <p>Can somebody help with new error?</p>