Make a droplet to convert color to grey as a BAT file

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

Moderators: XnTriq, helmut, xnview

jimbob

Make a droplet to convert color to grey as a BAT file

Post by jimbob »

I successfully use the command line within a Windows DOS prompt to convert a color JPG to a greyscale JPG:

nconvert -quiet -o output.jpg -grey 256 -out jpeg input.jpg

Can anyone assist with how I would make a BAT file to do this? I hope to be able to drag the icon of a color JPG (located anywhere on the computer) onto the BAT icon to convert it into a greyscale JPG. The output would have a new filename like 'converted-oldfilename.jpg' and it would be saved in the same location as the source image.

Is this possible with a BAT file?
User avatar
xnview
Author of XnView
Posts: 44930
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Make a droplet to convert color to grey as a BAT file

Post by xnview »

jimbob wrote:I successfully use the command line within a Windows DOS prompt to convert a color JPG to a greyscale JPG:

nconvert -quiet -o output.jpg -grey 256 -out jpeg input.jpg
Can anyone assist with how I would make a BAT file to do this? I hope to be able to drag the icon of a color JPG (located anywhere on the computer) onto the BAT icon to convert it into a greyscale JPG. The output would have a new filename like 'converted-oldfilename.jpg' and it would be saved in the same location as the source image.
Is this possible with a BAT file?
Perhaps by using %1 for parameters.
Pierre.