Page 1 of 1
Improving nConvert performance
Posted: Thu May 20, 2010 9:51 am
by Arvind
Hi,
I am using nconvert to transform a given file to another file of different dimensions.
Input File size: 541 kb
Command used: "C:\XnView\nconvert" -out jpeg -truecolors -bgcolor 255 255 255 -ratio -resize 0 0 -canvas 0 0 center -o "E:\mxImage\Color_Way_A.jpg" "E:\Color_Way_A.jpg"
This is taking about 400 millsec to complete.
My program has to do several such conversions one after the other. So, it ends up taking a lot of time.
I would like to know ways to improve time taken by nconvert. Are there any settings or extra parameters i can use which will cut down the time taken without affecting the quality of the output file to great extent?
Will batch conversion help? If yes, how should it be used?
Any other ideas are welcome.
Regards
arvind
Re: Improving nConvert performance
Posted: Thu May 20, 2010 1:07 pm
by xnview
-resize 0 0 -canvas 0 0 ???
Re: Improving nConvert performance
Posted: Fri May 21, 2010 4:12 am
by Arvind
Sorry.
That was a wrong example.
Cosnider this:
"C:\XnView\nconvert" -out jpeg -truecolors -bgcolor 255 255 255 -ratio -resize 42 42 -canvas 42 42 center -o "E:\mxThumbnail Image\B_W_Sketch_Front_B_W.jpg" "E:\B_W_Sketch_Front_B_W.jpg"
Also, is there any documentation to explain what each of these options to nconvert command are meant for? I could not find any useful write up on these options.
Re: Improving nConvert performance
Posted: Tue May 25, 2010 7:30 am
by xnview
Arvind wrote:"C:\XnView\nconvert" -out jpeg -truecolors -bgcolor 255 255 255 -ratio -resize 42 42 -canvas 42 42 center -o "E:\mxThumbnail Image\B_W_Sketch_Front_B_W.jpg" "E:\B_W_Sketch_Front_B_W.jpg"
Is it possible to have the file?
Also, is there any documentation to explain what each of these options to nconvert command are meant for? I could not find any useful write up on these options.
nconvert -help
Re: Improving nConvert performance
Posted: Wed May 26, 2010 6:11 am
by Arvind
Files differ in every use case i use. But stiil, I can share few sample files. Please let me know how should I send them. I could not find Upload Attachment option anywhere. Can i send by email directly to you? If yes, please give the mail id.
nconvert -help : this just gives the possible command line options and brief info.
Is there a complete description of what each option can do?
Re: Improving nConvert performance
Posted: Wed May 26, 2010 8:58 am
by xnview
Arvind wrote:Files differ in every use case i use. But stiil, I can share few sample files. Please let me know how should I send them. I could not find Upload Attachment option anywhere. Can i send by email directly to you? If yes, please give the mail id.
contact at xnview dot com
nconvert -help : this just gives the possible command line options and brief info.
Is there a complete description of what each option can do?
No, perhaps it will be a good idea to enhance nconvert documentation on
http://wiki.xnview.com
Re: Improving nConvert performance
Posted: Thu May 27, 2010 4:04 am
by foxyshadis
If you timed it, I bet most of your time would be wasted in the actual startup and shutdown of nconvert, not the internal manipulation. It's a pretty bulky program. You'd probably be better off hooking into gfl sdk as a dll/so so it only has to load up once, or using batch conversion to process the whole list in one session. It's very simple to set up batch conversion:
"C:\XnView\nconvert" -truecolors -bgcolor 255 255 255 -ratio -resize 42 42 -canvas 42 42 center -out jpeg -o "E:\mxImage\%.jpg" -xall "E:\*.jpg"
If you need different size thumbnails, though, it could be tougher.
Re: Improving nConvert performance
Posted: Tue Jun 01, 2010 11:24 am
by Arvind
I tried batch conversion using below command from command-line. It failed.
The files to be converted do not have any pattern in their names; they colud be random file names. SO, i need a generic way of reading all of them & applying nconvert on each one.
Code: Select all
"C:/XnView/nconvert" -out jpeg -truecolors -bgcolor 255 255 255 -ratio -resize 80 80 -canvas 80 80 center -o "F:/test/target/%%.jpg" -xall "F:/test/*.jpg"
** NCONVERT v5.31 (c) 1991-2009 Pierre-E Gougelet (May 13 2009/10:57:10) **
Version for Windows NT/9x/2000/Xp/Vista (All rights reserved)
** This is a freeware software (for non commercial use)
Error: Can't open file (F:/test/*.jpg)
Conversion of F:/test/*.jpg into F:/test/target/└ûæ| ║ûæ|⌠4Q└ûæ| ║ûæ|⌠4Q.jpg OK
Re: Improving nConvert performance
Posted: Wed Jun 02, 2010 5:42 am
by Arvind
I tried by removing double quotes in the filepath.
It could read all files in the input directory but only one generated file is created. The target file name is not having the same name as input file. IT is being generated as %%.jpg
Code: Select all
"C:/XnView/nconvert" -out jpeg -truecolors -bgcolor 255 255 255 -ratio -resize 80 80 -canvas 80 80 center -o F:/test/target/%%.jpg -xall F:/test/*.jpg
When run on the command prompt:
C:\Documents and Settings\qfp>"C:/XnView/nconvert" -out jpeg -truecolors -bgcolor 255 255 255 -ratio -resize 80 80 -canvas 80 80 center -o F:/test/target/%%.jpg -xall F:/test/*.jpg
** NCONVERT v5.31 (c) 1991-2009 Pierre-E Gougelet (May 13 2009/10:57:10) **
Version for Windows NT/9x/2000/Xp/Vista (All rights reserved)
** This is a freeware software (for non commercial use)
Conversion of F:/test/Color_Way_B.jpg into F:/test/target/└ûæ| ║ûæ|⌠4Q└ûæ| ║ûæ|⌠4Q.jpg OK
Conversion of F:/test/F-15_MiG-27.jpg into F:/test/target/F:/test/target/└ûæ| ║ûæ|⌠4Q└ûæ| ║ûæ|⌠4QF:/test/target/└ûæ| ║ûæ|⌠4Q└ûæ| ║ûæ|⌠4Q.jpg OK
Conversion of F:/test/ForecastEarth.jpg into F:/test/target/F:/test/target/F:/test/target/└ûæ| ║ûæ|⌠4Q└ûæ| ║ûæ|⌠4QF:/test/target/└ûæ| ║ûæ|⌠4Q└ûæ| ║ûæ|⌠4QF:/test/target/F:/test/target/└ûæ| ║ûæ|⌠4Q└ûæ| ║ûæ|⌠4QF:/test/target/└ûæ| ║ûæ|⌠4Q└ûæ| ║ûæ|⌠4Q.jpg OK