Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have to convert DPI of more than 5k Tiff images on a monthly basis from 200x200 to 100x100. I can do that in Irfan view using a .bat file that i have created.. the following is the .BAT file code

@"c:\program files\irfanview\i_view32.exe" "e:\batch1*.tif /aspectratio /resample /tifc=4 /dpi=(100,100) /convert=e:\batch2*.tif" %*

Where tifc=4 is Fax 4 compression

However, the above code doesn't help me change the DPI for other pages except for Only the first page in the tiff thats getting converted to 100 DPI. Rest all pages are still 200 DPI. I am using WinXP Professional and Irfan View. Can anyone tell me what I am missing.

share|improve this question
up vote 1 down vote accepted

Convert multiple images per command line

Use nconvert with its infinite possibilities.

NConvert is a batch utility for converting graphic files.

  • Import about 400 graphic file formats
  • Export about 40 graphic file formats
  • Multipage TIFF, Animated GIF, Animated ICO support
  • Resize
  • Adjust brightness, contrast...
  • Modify number of colors
  • Apply filters (blur, average, emboss, ...)
  • Apply effects (lens, wave, ...)
  • And many many other things

Read this User guide for some examples to start.
I uploaded the full help file on pastebin to see what parameters are available

Note: A graphical front-end using nconvert is XnConvert

To answer hemalshah' initial question

  1. download nconvert and place it somewhere
  2. create a .cmd in the same folder and copy&paste the following command
  3. Customize the path to your own .tiff image and execute the batch file.
    This will create a new mysource_1.tiff file in the source folder (use -overwrite to replace the original)

nconvert -out tiff -multi -dpi 100 -c 4 -keepdocsize -keepfiledate mysource.tif

  • this can easily be expanded to convert thousands of files at once.
    Nconvert understands textfiles with image paths as input
  • -out tiff -multi is necessary to tell nconvert to produce multi-page TIFF files
  • -dpi 100 obviously sets the new DPI
  • -keepdocsize preserves your page height and width
  • -keepfiledate preserves the original create date
  • -c 4 sets the compression method. I recommend ZLIB since it produces the smallest files
    Other compression methods

    1 (Rle), 2 (LZW), 3 (LZW+Prediction), 4 (ZLIB)
    5 (CCITT G3), 6 (CCITT G3-2D), 7 (CCITT G4) only B/W
    8 (JPEG) only 24/32 bits

I separated the output tiff into single page tiff files to see if all pages are set to 100 DPI. As the screenshot proves, nconvert will solve your issue.

enter image description here

share|improve this answer
@hemalshah Doesn't this answer solve your problem? I would be happy if you at least leave a comment if/what is not working. – nixda Feb 11 '13 at 9:14
Sorry, this question was asked in 2011 and was answered this year. I have not been checking StackOverflow/Superuser of late since and hence your answer is not marked as one. At the moment, there are no means for me to test this solution. I will, mark this as an answer since this seems to be detailed enough. Thank you very much. :) – hemalshah Jun 17 '13 at 17:21

You certainly can access the setting (affect all layers for tiffs, bottom right corner) in Advanced Options at batch menu dialog. So, the functionality is already there.Wether it's already ported to command line options, I don't know, might be not documented.

Another solution that could help (neither tried) is Imagemagick, download at It is a free command line editor/converter.

share|improve this answer
Its not helping me S.gfx. When i use the Advance Options at the Batch menu, its only publishing one page instead of the 10 pages that I already have. – hemalshah Feb 15 '11 at 12:38
Further more, I wish to have this as a Batch Conversion. I havent tried ImageMagick but will try that one too.. I read somewhere that applying the conversion settings to all pages on the command line isnt possible, however I can set up a process for each page. That, is not going to work when I have more than a 1000 files to be processed. I will try ImageMagick and see if it works for me... Thanks for your time. – hemalshah Feb 15 '11 at 12:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .