• 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
[OT] call gifsicle via Java process
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[OT] call gifsicle via Java process


  • Subject: [OT] call gifsicle via Java process
  • From: Ute Hoffmann <email@hidden>
  • Date: Sat, 10 Feb 2007 11:56:13 +0100

Hallo,
I'm sorry for this off topic post, but im pulling my hair after hours of testing and looking and perhaps someone sees what I miss.

I need to call gifsicle from a java process to optimize .gif images (as imageMagick fails to do so and getting it working with ImageMagick seems to either need a very old IM version or some tuning of the tifflib. I looked into it but descided not to).

This is what I want to do:

call a exec from my java function which hands over the correct infos to gifsicle and gifsicle reading the file in and writing it optimized back to disk.

This is the error I get:
Fehler bei der KonversionTTGifsicle$Exception: Could not exec process: /usr/local/bin/gifsicle < /Library/WebServer/Documents/cmsboard/ttwcmsdaten/bilder/tmp/26basispaket9.gif > /Library/WebServer/Documents/cmsboard/ttwcmsdaten/bilder/tmp/ute_nn.gif: not found. invocation line: /usr/local/bin/gifsicle < /Library/WebServer/Documents/cmsboard/ttwcmsdaten/bilder/tmp/26basispaket9.gif > /Library/WebServer/Documents/cmsboard/ttwcmsdaten/bilder/tmp/ute_nn.gif. error output: null

The file is there. When I open a terminal on the server and copy
/usr/local/bin/gifsicle < /Library/WebServer/Documents/cmsboard/ttwcmsdaten/bilder/tmp/26basispaket9.gif > /Library/WebServer/Documents/cmsboard/ttwcmsdaten/bilder/tmp/ute_nn.gif

into the terminal gifsicle does as asked. Only difference aside from java involved/not involved: I'm logged in as root

So:
a) Do you think that what I see here is a permission problem
b) Has someone experience with calling gifsicle from java and could perhaps give me a code example of the call.

Thank you for some insight.

Regards

Ute

P.S:
This is my call:

String[] cmdArray = new String[] {
"/usr/local/bin/gifsicle "+"< "+sourceFilePath+" > "+outFilePath
};

NSMutableArray stdErrContents = new NSMutableArray();
NSMutableArray stdOutContents = new NSMutableArray();
int resultCode;
try {
resultCode = exec( cmdArray, stdOutContents, stdErrContents );
}
catch ....

 _______________________________________________
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: [OT] call gifsicle via Java process
      • From: Alexander Spohr <email@hidden>
    • Re: [OT] call gifsicle via Java process
      • From: "Jerry W. Walker" <email@hidden>
  • Prev by Date: Re: WOForm and "multipleSubmit"
  • Next by Date: Re: Query on relationship to abstract entity failing w/horizontal inheritance
  • Previous by thread: CANCELED -- MEETING: Chicago CocoaHeads / CAWUG Tuesday Feb. 13 6:00 pm
  • Next by thread: Re: [OT] call gifsicle via Java process
  • Index(es):
    • Date
    • Thread