Page 1 of 1

Using NConvert from another exe

Posted: Fri Jul 22, 2011 9:08 pm
by catseye
Hi,

I'm trying to use NConvert to convert many images after they are scanned by a third party software.
I use in my exe, CreateProcess to call NConvert with the command line parameters:
nconvert -out jpeg -q 60 image0001.tif
It works fine, no problem with that, it works also with ShellExecute calling a batch file process.bat containing this line for example.

But my problem starts with JPEG2000 conversion:
nconvert -out jp2 -comp_ratio 60 image0001.tif
The output is :
Bad output format 'jp2'

What is strange is if I create a process.bat containing the exact same command line, and double click on it, it works, doesn't matter where I start it. Seems like there is something wrong when NConvert tries to validate the format, plugins installed or something.

I have installed XnView latest version from this day, full featured, with all plugins. XnView folder is on the environment PATH.
Like I said, process.bat works and convert to JPEG2000 this file, but calling process.bat from CreateProcess, or ShellExecute fails.

Any clue ?

Re: Using NConvert from another exe

Posted: Mon Aug 08, 2011 12:55 pm
by xnview
Do you have always this issue?