Runtime.getRuntime().exec() cannot execute convert ?

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
binocthex11

Runtime.getRuntime().exec() cannot execute convert ?

Post by binocthex11 »

Code: Select all

cmd = String.format("convert -debug all c:\\abc\\background3.bmp %s\\result.gif -loop 0 %s\\final.gif", tempFolder, tempFolder);    	
run.exec(String.format("cmd.exe /c %s", cmd));
I use this to put a GIF on a background, but this does not work, nothing happened an no error is returned.

How could I use exec() to perform convert commands ?

Thanks!
binocthex11

Re: Runtime.getRuntime().exec() cannot execute convert ?

Post by binocthex11 »

binocthex11 wrote:

Code: Select all

cmd = String.format("convert -debug all c:\\abc\\background3.bmp %s\\result.gif -loop 0 %s\\final.gif", tempFolder, tempFolder);    	
run.exec(String.format("cmd.exe /c %s", cmd));
I use this to put a GIF on a background, but this does not work, nothing happened an no error is returned.

How could I use exec() to perform convert commands ?

Thanks!

OK, I've found the reason.
The animation result.gif in my code may not be prepared well for this convert command.

the -debug all option prints the message: unable open file result.gif

Hope it will be help for others.
Post Reply