Automating image conversion

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

Moderators: XnTriq, xnview

Post Reply
jdavis
Posts: 2
Joined: Fri Mar 19, 2004 11:45 pm

Automating image conversion

Post by jdavis » Fri Mar 19, 2004 11:56 pm

Hi,

I am working on a little project to allow our users to drop files into directories that are then processed via a cron job to various maximum resolutions and written to corresponding output directories. I would like to be able to keep the file type the same as what they drop off for processing, but there does not seem to be a way to do this, at least not within nconvert itself. Anyone have a nifty bash or perl script that might handle this?

My current command line is as follows:

nconvert -v -resize 150 150 -ratio -o ../imageconverted/150x150/%.* *.*

All my output filnames have ".*" as their extension. Weird.

Also, more detailed docs would be helpful if anyone knows where to find them...

Thanks

User avatar
xnview
Author of XnView
Posts: 31887
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Automating image conversion

Post by xnview » Tue Mar 23, 2004 4:35 am

jdavis wrote:My current command line is as follows:

nconvert -v -resize 150 150 -ratio -o ../imageconverted/150x150/%.* *.*
All my output filnames have ".*" as their extension. Weird.
And the file format is not kept?
Pierre.

jdavis
Posts: 2
Joined: Fri Mar 19, 2004 11:45 pm

Re: Automating image conversion

Post by jdavis » Tue Mar 23, 2004 5:50 pm

xnview wrote:
jdavis wrote:My current command line is as follows:

nconvert -v -resize 150 150 -ratio -o ../imageconverted/150x150/%.* *.*
All my output filnames have ".*" as their extension. Weird.
And the file format is not kept?
Pierre.
The format is fine. The filename, or rather the file extension, is not. Since most of the users of the process will be running winderz, file extensions are critical. The filename is passed just fine, but the extension is not created along with it. Since users might drop GIFs, BMPs, or ??? into the directories for processing, it would be *nice* if nconvert would assign the extension based on the destination format. It may do this through commandline arguments, but I have been unsucessful in figuring this out myself.

Thanks,

-Jeff

Post Reply