Using NConvert from another exe

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: XnTriq, helmut, xnview

Post Reply
catseye
Posts: 1
Joined: Wed Mar 14, 2007 8:16 pm

Using NConvert from another exe

Post 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 ?
User avatar
xnview
Author of XnView
Posts: 43598
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Using NConvert from another exe

Post by xnview »

Do you have always this issue?
Pierre.
Post Reply