10 Useful Command-Line IrfanView Tools For Working With Images

Ryan Dube 08-07-2011

These days, screenshot applications are a dime a dozen, and you can do image editing offline Want to Become an Artist? 13 Chrome Apps to Get You Started Do you have an interest in art or becoming an artist? Or maybe you have a friend or child who does? With Chrome apps and extensions, you can explore that amazing world. Read More , online 5 Really Powerful Online Image Editing Tools Read More and even on your phone Photoshop Mobile - A Freeware Image Editor for Your Mobile Read More . So what’s a new way that you can make use of image editing or screenshot tools that goes beyond just opening up an app and editing images? What if you could integrate image editing directly into your batch jobs or Windows scripts Better Than Batch: A Windows Scripting Host Tutorial Read More ?


If you’re familiar with IrfanView 6 Cool IrfanView Plugins To Enhance This Simple Image Editor Read More , and think that it’s only a simple image editor and screenshot app, then I invite you to take another look. All of the following script commands can be run from the command prompt, so long as you are working in the directory where IrfanView is installed – which is typically “C:\Program Files(x86)\IrFanView\”. All of the following commands will work from there, or you can include that directory in your system PATH variable so that the “i_view32.exe” command will be recognized no matter where you’re working from.

Running IrfanView Commands

You can find a long list of script commands from within the IrfanView application when you click on Help and search for “command line options“. I want to point out 10 of the most powerful and useful commands that are available.  You can issue these from the command prompt (or from within a Windows Script or Batch file).

Create An Instant Slideshow

The first command I want to show you is one that creates an instant slideshow from a whole bunch of pictures. These can be pictures that you have stored in a directory, or from a list of files defined in a text file. The command is as follows:

"i_view32.exe /slideshow=c:\temp\testpics\*.* /closeslideshow"

The way this works is simple. You could replace  “c:\mypictures\*.*” with “c:\mypics.txt” if you like if you want to use a text file filled with a list of pictures with the full path for each.

irfanview command line


Pictures show up in the center of your screen on a black background. The /closeslideshow parameter tells the app to close automatically after the last picture.

The nice thing about being able to launch a slideshow with one command line is that you can display your slideshow instantly without any work. Just type the command and start scrolling!

Look At All Images In A Directory

The next command is a fast way to take a look at all images within a directory without the need to open up every one of them.

"i_view32.exe c:\temp\testpics /thumbs"

This instantly launches IrfanView in thumbnail mode, and defaults to the directory that you’ve defined.


irfanview command line options

Resize Lots Of Images At Once

The third command I want to cover is my favorite. One thing that I find annoying and time consuming is resizing a large collection of images.

Instead, just issue this command and you’re done in seconds.

"i_view32.exe c:\temp\testpics\*.jpg /resize=(200,100) /aspectratio /resample /convert=c:\temp\testpics\testsmall\*.png"

Let me break this down. The first part defines your source directory and image type. Then you define the resize parameters. The last part of the command will convert the output images to any format. In seconds, all images are done.


irfanview command line options

Send Image Collections To The Printer

The fourth command is pretty simple. Want to send a collection of images to your default printer? Just issue the following command.

"i_view32.exe c:\testpics\*.jpg /print"

Take Instant Screenshots With A File Timestamp

Another pretty cool command is one that takes an instant screenshot and saves as a file with a time stamp.

"i_view32.exe /capture=0 /convert=c:\temp\capture_$U(%d%m%Y_%H%M%S).jpg"

The capture=0 could be 1 (current monitor), 2 (foreground window), 3 (client area), 4 (rectangle section), or 5 (launch in capture mode).


irfanview command line options

Once the full screenshot is saved to file, you can email it or process it using other Windows Scripting or Batch commands. The potential of this command is pretty powerful.

Search For Images Quickly On Your Computer

The sixth command is a fast and easy way to search for images on your computer. Just type:

"i_view32.exe c:\temp\testpics\ /thumbs /filepattern="*.png""

This will open IrfanView in thumbnail mode, using the file pattern that you defined.

irfanview commands

Deny User Permissions

The next command I wanted to show you is probably the coolest. Let’s say that you’re writing a Windows Script and you want to display a picture to the user, but you don’t want to let them modify or change the file. You can accomplish this with the following command:

"i_view32.exe c:\test.jpg /hide=7"

The “hide” value is a combination of what parts of the window you want to hide. Just choose 1 (toolbar), 2 (status bar), 4 (menu bar), or 8 (caption). To combine multiple parts of the window, just add the numbers together!

irfanview commands

Be careful about using 15, because if you hide everything, the user will have no way of ever closing the window at all.

Output Text Files To A TIF File

Some other wonderfully useful commands include outputting text files to a TIF file:

"i_view32.exe c:\test.jpg /append=c:\test.tif"

irfanview commands

Create A Panorama Image

Creating a panorama image from multiple images – 1 is horizontal and 2 is vertical.

"i_view32.exe /panorama=(1,c:\pics\china1.png,c:\pics\china2.png,c:\pics\china3.png)"

10 Useful Command-Line IrfanView Tools For Working With Images irfan9

Set An Image As Desktop Wallpaper

Finally, the command that could also make for a pretty good practical joke if you use the right photo, the command to set an image as the computer desktop wallpaper background.

"i_view32.exe c:\test.jpg /wall=0"

Set wall equal to 0 for a centered image, 1 to tile it, 2 to stretch it and 3 to resize the image proportionally.

irfanview command line

You can set the background image on your PC using this command much faster than the number of clicks it takes to do it otherwise. That’s the beauty of the set of command tools you get through IrfanView – you can process and manipulate images on your PC much faster and more efficiently than would ever be possible using the old point and click approach.

Give a few of these commands a try on your own PC and see if it helps you save a little time and become more productive when dealing with images. Share your thoughts and your own IrfanView command line tips in the comments section below.

Image credits: Kakao Por

Related topics: Image Editor, Programming, Screen Capture.

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. zaki
    January 8, 2020 at 1:30 pm

    command line panorama is great but it should be saved to a file .

  2. michael
    April 30, 2015 at 2:25 pm

    any idea? I find the quality poor, consider if you use the GUI to resize images

    "i_view32.exe c:temptestpics*.jpg /resize=(1100,733) /dpi=(500,500) /aspectratio /resample /convert=c:temptestpicstestsmall*.png"

  3. Anonymous
    July 11, 2011 at 12:14 am

    Take Instant Screenshots With A File Timestamp
    Another pretty cool command is one that takes an instant screenshot and saves as a file with a time stamp.
    "i_view32.exe /capture=0 /convert=c:tempcapture_$U(%d%m%Y_%H%M%S).jpg"
    capture=0 could be 1 (current monitor), 2 (foreground window), 3
    (client area), 4 (rectangle section), or 5 (launch in capture mode).

    what are the extra commands to take a screenschot every 10 seconds ?

    • Anonymous
      July 19, 2011 at 3:13 am

      There may be an easier way to do it, but I would write a batch job (or Windows Script) with a loop that runs that command every 10 seconds.

      • Anonymous
        July 19, 2011 at 5:56 am

        would appreciate the contents of the batch file

  4. DeadlyDad
    July 9, 2011 at 8:17 pm

    Good article!  To expand your command line graphics power exponentially, install Imagemagick.

    • Anonymous
      July 19, 2011 at 3:11 am

      Nice - thanks DeadlyDad!