Nconvert and Visual Basic

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

Moderators: XnTriq, helmut, xnview


Nconvert and Visual Basic

Post by ralph »

Is it possible to use nconvert in visual basic with the shell-command

i'd tried to use the following statement, but it did not work

x=shell(d:\nconvert.exe -o file_out.jpg file_in.jpg)

any suggestions?
User avatar
Posts: 8705
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Post by helmut »

I've just checked and the sample below works for me. Though the correct paths are an issue: If you do not specificy paths, I think the current dir, that is the directory where the running VB application resides in, will be used. To be on the save side make sure you specify valid paths for nconvert, input and output file.

Code: Select all

    Dim taskID As Double
    taskID = Shell("C:\Program Files\XnView\nconvert.exe -o D:\file_out.jpg D:\file_in.jpg")
Not sure in your case, but I recommend you to have a look at GFL SDK.

Post by Guest »

:D it works...

thanks a lot