• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
(slightly-ot): Problem with ImageMagick and Runtime.exec
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(slightly-ot): Problem with ImageMagick and Runtime.exec


  • Subject: (slightly-ot): Problem with ImageMagick and Runtime.exec
  • From: Ralph Scheuer <email@hidden>
  • Date: Tue, 24 Jan 2006 20:19:13 +0100

(Sorry for being a bit OT and sorry for cross-posting, but this is urgent for me and maybe someone on this list has already seen it)

Hello everybody, 

in my WO application, I use ImageMagick's "identify" command line tool to get various properties of image files. 

However, in order to get the properties of EPS files, ImageMagick's "identify" uses ghostscript (calls gs), which I have downloaded and installed separately. 

"identify" also works nicely and seemlessly with the command line on EPS files exactly the same way it would work with JPEGs etc. 

However, Java's Runtime.exec method seems to require an extra step for dealing with identify's call to gs. The following code snippet: 

                try {
   
                    Process process = Runtime.getRuntime().exec(invocationString);
   
                    process.getInputStream().read(myBytes);
   
                    results = new String (myBytes);
   
                    System.out.println("##### "+ results );
   
                } catch (Exception exception) {
   
                }

produces my desired result string as long as I work with non-EPS files. If I use EPS files and identify calls "gs", my result string is empty and I get nothing back. 

Is there anything I have to watch out for? 

Thanks in advance for any hints...

Ralph
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: (slightly-ot): Problem with ImageMagick and Runtime.exec
      • From: email@hidden
    • Re: (slightly-ot): Problem with ImageMagick and Runtime.exec
      • From: Mike Schrag <email@hidden>
  • Prev by Date: Re: Implementing an ordered tree
  • Next by Date: Re: (slightly-ot): Problem with ImageMagick and Runtime.exec
  • Previous by thread: Re: Strange ec.save problem
  • Next by thread: Re: (slightly-ot): Problem with ImageMagick and Runtime.exec
  • Index(es):
    • Date
    • Thread