Difference between revisions of "NConvert User Guide"

From XnView Wiki
Jump to: navigation, search
(Created page with 'NConvert is the multi-format commandline image converter for Win32, Linux, DOS, OS/2, and other platforms. * Type "nconvert -help" for available options. * Type "nconvert -hel…')
 
m
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{|NConvert
 +
| '''Latest release:'''            || 6.70 / [http://www.xnview.com/en/nconvert/#downloads Download] / May 2015
 +
|-
 +
| '''Website:'''            || [http://www.xnview.com http://www.xnview.com/en/nconvert/]
 +
|-
 +
| '''Forum:'''            || [http://newsgroup.xnview.com/viewforum.php?f=57 newsgroup.xnview.com]
 +
|-
 +
|}
 +
 +
----
 +
[{{fullurl:{{FULLPAGENAMEE}}|action=pdfbook&follow=breadth}} Download Reference Manual as PDF]
 +
----
 +
 
NConvert is the multi-format commandline image converter for Win32, Linux, DOS, OS/2, and other platforms.
 
NConvert is the multi-format commandline image converter for Win32, Linux, DOS, OS/2, and other platforms.
  
Line 5: Line 18:
 
* Type "nconvert -help > nchelp.txt" to save the help text into the file "nchelp.txt".  
 
* Type "nconvert -help > nchelp.txt" to save the help text into the file "nchelp.txt".  
  
* To convert files to a specific format, type for example :
+
* Convert files to a specific format
 
  nconvert -out tiff file1.pic file2.jpg file3.tga
 
  nconvert -out tiff file1.pic file2.jpg file3.tga
 
 
* With a resize :
 
nconvert -out jpeg -ratio -resize 480 0 *.jpg
 
nconvert -out jpeg -resize 640 480 *.jpg
 
 
 
The input format is not necessary, it will be autodetected. If a problem occurs, use the -in option.
 
 
 
* Nconvert is able to transform images while converting:
 
  
    * To convert GIF files to JPEG files :
+
* Convert GIF files to JPEG files
        nconvert -out jpeg -truecolors *.gif
+
nconvert -out jpeg -truecolors *.gif
 
      
 
      
    * To convert JPEG files to GIF files :
+
* Convert JPEG files to GIF files
        nconvert -out gif -dither -colors 256 *.jpeg
+
  nconvert -out gif -dither -colors 256 *.jpeg
 
      
 
      
    * To resize :
+
* Convert with a resize
        nconvert -out png -resize 510 230 *.jpeg
+
nconvert -out png -resize 510 230 *.jpeg
        nconvert -out png -ratio -resize 510 0 *.jpeg
+
nconvert -out png -ratio -resize 510 0 *.jpeg
        nconvert -out png -ratio -resize 0 510 *.jpeg
+
nconvert -out png -ratio -resize 0 510 *.jpeg
        nconvert -out png -resize 200% 200% *.jpeg
+
nconvert -out png -resize 200% 200% *.jpeg
 
      
 
      
  You can use it with images sequences.  
+
* You can use it with images sequences.  
    For example, to convert the files file00.pic, file01.pic, ..., file10.pic and  
+
For example, to convert the files file00.pic, file01.pic, ..., file10.pic and we convert to jpeg format with the name pattern res0.jpg, res1.jpg, ... type :
      we convert to jpeg format with the name pattern res0.jpg, res1.jpg, ... type :
+
nconvert -out jpeg -n 1 10 1 -o res#.jpg file##.pic
        nconvert -out jpeg -n 1 10 1 -o res#.jpg file##.pic
 
 
 
  You can use % to specify source filename in dest filename.
 
    For example, nconvert -out jpeg -o result_%.jpg file.tga
 
      creates a file named result_file.jpg
 
  
    Note for windows users: in batch files you must write %% instead of %. To bypass this problem, you can use a nconvert script instead of a batch file.
+
* You can use % to specify source filename in dest filename.
 +
For example, nconvert -out jpeg -o result_%.jpg file.tga creates a file named result_file.jpg
  
  You can control nconvert with a script, performing multiple sets of conversions on multiple sets of files, example:
+
Note for Windows users: In batch files you must write %% instead of %. To bypass this problem, you can use a nconvert script instead of a batch file.
  
    ### -out png -rtype lanczos -resize 200% 150%
+
* You can control nconvert with a script, performing multiple sets of conversions on multiple sets of files, example:
  
 +
    ### -out png -rtype lanczos -resize 200% 150% <br />
 
     screenshot1.bmp
 
     screenshot1.bmp
 
     screenshot2.bmp
 
     screenshot2.bmp
 
     screenshot3.bmp
 
     screenshot3.bmp
 
 
     ### -out gif -rtype lanczos -resize 500% 500% -oil 10 -colours 32
 
     ### -out gif -rtype lanczos -resize 500% 500% -oil 10 -colours 32
 
 
     F:\icons\smile.bmp
 
     F:\icons\smile.bmp
 
 
 
     ### -out bmp -rtype lanczos -resize 30% 30% -oil 2 -rotate_flag smooth -rotate 45
 
     ### -out bmp -rtype lanczos -resize 30% 30% -oil 2 -rotate_flag smooth -rotate 45
 
 
     selfportrait.png
 
     selfportrait.png
     mydog.png
+
     mydog.png<br />
   
 
 
     Save this into a text file, for example "nc.txt", and then run nconvert with this file as the only parameter: "nconvert nc.txt" .   
 
     Save this into a text file, for example "nc.txt", and then run nconvert with this file as the only parameter: "nconvert nc.txt" .   
  
Line 71: Line 68:
 
'''Notes for DOS users:'''
 
'''Notes for DOS users:'''
 
<blockquote>
 
<blockquote>
Since v4.90, nconvert is supported for DOS again. Is is a 32-bit DOS application, using the "DOS/32A Extender".
+
Since version 4.90, nconvert is supported for DOS again. It is a 32-bit DOS application, using the "DOS/32A Extender".
 
</blockquote>
 
</blockquote>

Latest revision as of 16:19, 30 June 2015

Latest release: 6.70 / Download / May 2015
Website: http://www.xnview.com/en/nconvert/
Forum: newsgroup.xnview.com

Download Reference Manual as PDF


NConvert is the multi-format commandline image converter for Win32, Linux, DOS, OS/2, and other platforms.

  • Type "nconvert -help" for available options.
  • Type "nconvert -help > nchelp.txt" to save the help text into the file "nchelp.txt".
  • Convert files to a specific format
nconvert -out tiff file1.pic file2.jpg file3.tga
  • Convert GIF files to JPEG files
nconvert -out jpeg -truecolors *.gif
   
  • Convert JPEG files to GIF files
 nconvert -out gif -dither -colors 256 *.jpeg
   
  • Convert with a resize
nconvert -out png -resize 510 230 *.jpeg
nconvert -out png -ratio -resize 510 0 *.jpeg
nconvert -out png -ratio -resize 0 510 *.jpeg
nconvert -out png -resize 200% 200% *.jpeg
   
  • You can use it with images sequences.
For example, to convert the files file00.pic, file01.pic, ..., file10.pic and we convert to jpeg format with the name pattern res0.jpg, res1.jpg, ... type :
nconvert -out jpeg -n 1 10 1 -o res#.jpg file##.pic
  • You can use % to specify source filename in dest filename.
For example, nconvert -out jpeg -o result_%.jpg file.tga creates a file named result_file.jpg
Note for Windows users: In batch files you must write %% instead of %. To bypass this problem, you can use a nconvert script instead of a batch file.
  • You can control nconvert with a script, performing multiple sets of conversions on multiple sets of files, example:
   ### -out png -rtype lanczos -resize 200% 150% 
screenshot1.bmp screenshot2.bmp screenshot3.bmp ### -out gif -rtype lanczos -resize 500% 500% -oil 10 -colours 32 F:\icons\smile.bmp ### -out bmp -rtype lanczos -resize 30% 30% -oil 2 -rotate_flag smooth -rotate 45 selfportrait.png mydog.png
Save this into a text file, for example "nc.txt", and then run nconvert with this file as the only parameter: "nconvert nc.txt" .

Limitations:

  • Add text feature uses the Win32 API and is avaiable on Win32 only.
  • Some exotical image formats use external DLL's and are available on Win32 only.
  • When using a script file, avoid multiple spaces in the conversion definitions, they confuse the parser.
  • Converting huge images, or scaling up to a huge size requires much memory and may not always work.

Notes for DOS users:

Since version 4.90, nconvert is supported for DOS again. It is a 32-bit DOS application, using the "DOS/32A Extender".