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

Re: [OT] call gifsicle via Java process


  • Subject: Re: [OT] call gifsicle via Java process
  • From: Alexander Spohr <email@hidden>
  • Date: Thu, 15 Feb 2007 10:31:20 +0100


Am 10.02.2007 um 11:56 schrieb Ute Hoffmann:

P.S:
This is my call:

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

this seems wrong. i don't think, that you can just repipe stdin and stdout like this. that's a function of the shell. and you have no shell by calling exec.

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

here is your stdout.

try using
gifsicle infile.gif -o outfile.gif
(see http://www.lcdf.org/gifsicle/man.html)

and you have to build the cmdArray in the right way. adding parameters to the first element (the executable) will not work.

here's a part of my code (calling imageMagick):

		String args[] = new String[4 + moreArgsCount];
		args[0] = uploadScriptPath;
		args[1] = "-S \"" + aMandant.ftpHost() + '\"';
		args[2] = "-u \"" + aMandant.ftpUser() + '\"';
		args[3] = "-p \"" + aMandant.ftpPass() + '\"';
		for (int i = 0; i < moreArgsCount; i++)
			args[i + 4] = moreArgs[i];
		try
		{
			Process aProcess = Runtime.getRuntime().exec(args);
...

Freeport & Soliversum
Alexander Spohr
email@hidden
www.freeport.de


_______________________________________________ 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>
References: 
 >[OT] call gifsicle via Java process (From: Ute Hoffmann <email@hidden>)

  • Prev by Date: CANCELED -- MEETING: Chicago CocoaHeads / CAWUG Tuesday Feb. 13 6:00 pm
  • Next by Date: Re: [OT] call gifsicle via Java process
  • Previous by thread: Re: [OT] call gifsicle via Java process
  • Next by thread: Re: [OT] call gifsicle via Java process
  • Index(es):
    • Date
    • Thread