Page 1 of 1

Choose File Location When Converting Image Size

Posted: Fri May 29, 2015 11:57 pm
by jandro
Does anyone know how to choose the output location of an image when converting its size? I've tried adding the folder location to the command but it doesn't seem to work. This is the command that i'm using (Straight from the tutorial)

nconvert -out png -resize 510 230 *.jpeg

Any suggestions would be great. Thank you!

Re: Choose File Location When Converting Image Size

Posted: Sat May 30, 2015 3:15 am
by XnTriq
Mango Juice ([url=http://newsgroup.xnview.com/viewtopic.php?p=60592#p60592]bugs and suggestions for NConvert[/url]) wrote:
mrQQ wrote:and second, it would be really great to have an option to specify output path..
mrQQ: try using the -o parameter!

so: -o c:\downloads\filename.jpg
or: -o c:\downloads\%.jpg - if you're doing multiple files - % will become the source file name minus extension

Remember to use %% if you're running it out of a batch file.

Re: Choose File Location When Converting Image Size

Posted: Tue Jun 23, 2015 9:13 pm
by ghiebert
I just downloaded ncovert.exe today from here, so can I assume it is the latest?

To resize multiple tif's to 1000px longest dimension, keeping the aspect ratio, convert to jpeg and then save the files to a different directory, this worked for me:
Start directory: f:\5DMkII
Destination directory: f:\test

nconvert.exe -out jpeg -ratio -resize longest 1000 -o f:\test\% f:\5DMkII\*.tif

The % means the filename. It would have been better if they had used something more obvious like {filename} because when you are scripting % can mean a lot of various things.
I guess I could have put -dpi 72 in there for web images
Note: You cannot place the -o parameter at the end of the line after the source directory name, as one intuitively might think to do.