VBA – Automating Irfanview

IrfanView Icon

I didn’t originally plan on making any posts about Irfanview, but because I mentioned in in my recent YouTube video regarding

I figured I owed it to everyone to at least touch upon the subject.

I have been using IrfanView for at least 20 years.  It is an exceptional tool for playing around with images!  IMHO, is the foundation that was used to create many other similar tools that we now know of, but it was the original.

In the referenced post above, I discuss how we can easily use WIA to convert images between 5 different formats:

  • bmp
  • gif
  • jpg
  • png
  • tiff

but what if we wanted/needed some other format?  What about a format like:

  • ico
  • ppm
  • raw
  • webp
  • and the list goes on!

Well this is where we can use some basic VBA automation to accomplish such conversion with Irfanview.

You see, Irfanview exposes a multitude of command line switches which enable us to pretty much do anything we want via code that we can do manually.  Hence, it lends itself easily to automation.

You can do things like the following to images:

  • open
  • convert format
  • crop
  • resize
  • convert to grayscale
  • rotate
  • flip
  • change the dpi
  • change color depth
  • print
  • and much more

Today, I will show you a few basic examples from which you can hopefully build upon to suit your needs.
 

Locating IrfanView’s EXE

Instead of hard coding IrfanView’s exe path, I wanted to create more versatile code and set off to use the registry to retrieve this information.  Sadly, since x64 came out Microsoft has made this task evermore difficult.  I’ll save you the frustration, below is code that does the job!

The most important part of the code being a gem of a routine I located a while back in a forum for reading the registry key:

'Source: https://stackoverflow.com/a/7004309 - Helen!
' Reads a REG_SZ value from the local computer's registry using WMI.
' Parameters:
'   RootKey - The registry hive (see http://msdn.microsoft.com/en-us/library/aa390788(VS.85).aspx for a list of possible values).
'   Key - The key that contains the desired value.
'   Value - The value that you want to get.
'   RegType - The registry bitness: 32 or 64.
Function ReadRegStr(RootKey, Key, Value, RegType)
    Dim oCtx, oLocator, oReg, oInParams, oOutParams

    Set oCtx = CreateObject("WbemScripting.SWbemNamedValueSet")
    oCtx.Add "__ProviderArchitecture", RegType

    Set oLocator = CreateObject("Wbemscripting.SWbemLocator")
    Set oReg = oLocator.ConnectServer("", "root\default", "", "", , , , oCtx).Get("StdRegProv")

    Set oInParams = oReg.Methods_("GetStringValue").InParameters
    oInParams.hDefKey = RootKey
    oInParams.sSubKeyName = Key
    oInParams.sValueName = Value

    Set oOutParams = oReg.ExecMethod_("GetStringValue", oInParams, , oCtx)

    ReadRegStr = oOutParams.sValue
End Function

with that, we can then easily get the path of IrfanView’s exe by simply doing something along the lines of:

'---------------------------------------------------------------------------------------
' Procedure : IrfanView_GetExe
' Author    : Daniel Pineault, CARDA Consultants Inc.
' Website   : http://www.cardaconsultants.com
' Purpose   : Retrieve the path and exe of IrfanView
' Copyright : The following is release as Attribution-ShareAlike 4.0 International
'             (CC BY-SA 4.0) - https://creativecommons.org/licenses/by-sa/4.0/
' Req'd Refs: None required
'
' Usage:
' ~~~~~~
' ? IrfanView_GetExe
'   Returns -> C:\Program Files\IrfanView\i_view64.exe
'
' Revision History:
' Rev       Date(yyyy-mm-dd)        Description
' **************************************************************************************
' 1         2023-04-20
'---------------------------------------------------------------------------------------
Function IrfanView_GetExe() As String
On Error GoTo Error_Handler

    Dim vPath As Variant
    Const HKEY_LOCAL_MACHINE = &H80000002
    
    vPath = ReadRegStr(HKEY_LOCAL_MACHINE, "SOFTWARE\IrfanView\shell\open\command", "", 32)
    If IsNull(vPath) Then _
        vPath = ReadRegStr(HKEY_LOCAL_MACHINE, "SOFTWARE\IrfanView\shell\open\command", "", 64)
    If Not IsNull(vPath) Then vPath = Replace(vPath, Chr(34), "")
    IrfanView_GetExe = Nz(vPath, "")
    
Error_Handler_Exit:
    On Error Resume Next
    Exit Function
 
Error_Handler:
    MsgBox "The following error has occurred" & vbCrLf & vbCrLf & _
           "Error Source: IrfanView_GetExe" & vbCrLf & _
           "Error Number: " & Err.Number & vbCrLf & _
           "Error Description: " & Err.Description & _
           Switch(Erl = 0, "", Erl <> 0, vbCrLf & "Line No: " & Erl) _
           , vbOKOnly + vbCritical, "An Error has Occurred!"
    Resume Error_Handler_Exit
End Function

Now that we can get IrfanView’s path and the exe, we are ready to perform some automation!
 

Launching IrfanView

You can use a Subroutine such as this one to simply open Irfanview.

'---------------------------------------------------------------------------------------
' Procedure : IrfanView_Launch
' Author    : Daniel Pineault, CARDA Consultants Inc.
' Website   : http://www.cardaconsultants.com
' Purpose   : pen IrfanView (start the application) using IrfanView automation
' Copyright : The following is release as Attribution-ShareAlike 4.0 International
'             (CC BY-SA 4.0) - https://creativecommons.org/licenses/by-sa/4.0/
' Req'd Refs: None required
'
' Usage:
' ~~~~~~
' Call IrfanView_Launch
'
' Revision History:
' Rev       Date(yyyy-mm-dd)        Description
' **************************************************************************************
' 1         2023-04-19              Initial Release
'---------------------------------------------------------------------------------------
Sub IrfanView_Launch()
    On Error GoTo Error_Handler
    Dim sExe                  As String

    sExe = IrfanView_GetExe
    If sExe <> "" Then
        Call Shell(sExe, vbNormalFocus)
    Else
        'Couldn't find the exe..., now what?  Throw an error?
    End If

Error_Handler_Exit:
    On Error Resume Next
    Exit Sub

Error_Handler:
    MsgBox "The following error has occurred" & vbCrLf & vbCrLf & _
           "Error Source: IrfanView_Launch" & vbCrLf & _
           "Error Number: " & Err.Number & vbCrLf & _
           "Error Description: " & Err.Description & _
           Switch(Erl = 0, "", Erl <> 0, vbCrLf & "Line No: " & Erl) _
           , vbOKOnly + vbCritical, "An Error has Occurred!"
    Resume Error_Handler_Exit
End Sub

 

Opening an Image in IrfanView

Now to open an image in IrfanView, we need only tweak the above by adding a simple command line switch, resulting in:

'---------------------------------------------------------------------------------------
' Procedure : IrfanView_OpenImage
' Author    : Daniel Pineault, CARDA Consultants Inc.
' Website   : http://www.cardaconsultants.com
' Purpose   : Open the specified image in IrfanView using IrfanView automation
' Copyright : The following is release as Attribution-ShareAlike 4.0 International
'             (CC BY-SA 4.0) - https://creativecommons.org/licenses/by-sa/4.0/
' Req'd Refs: None required
'
' Input Variables:
' ~~~~~~~~~~~~~~~~
' sImg      : Fully qualified path and filename of the image to open
'
' Usage:
' ~~~~~~
' Call IrfanView_OpenImage("C:\Temp\TestImage.png")
'
' Revision History:
' Rev       Date(yyyy-mm-dd)        Description
' **************************************************************************************
' 1         2023-04-19              Initial Release
'---------------------------------------------------------------------------------------
Sub IrfanView_OpenImage(sImg As String)
    On Error GoTo Error_Handler
    Dim sExe                  As String

    sExe = IrfanView_GetExe
    If sExe <> "" Then
        Call Shell(sExe & " """ & sImg & """", vbNormalFocus)
    Else
        'Couldn't find the exe..., now what?  Throw an error?
    End If

Error_Handler_Exit:
    On Error Resume Next
    Exit Sub

Error_Handler:
    MsgBox "The following error has occurred" & vbCrLf & vbCrLf & _
           "Error Source: IrfanView_OpenImage" & vbCrLf & _
           "Error Number: " & Err.Number & vbCrLf & _
           "Error Description: " & Err.Description & _
           Switch(Erl = 0, "", Erl <> 0, vbCrLf & "Line No: " & Erl) _
           , vbOKOnly + vbCritical, "An Error has Occurred!"
    Resume Error_Handler_Exit
End Sub

 

Convert an Image Between Formats Via IrfanView Automation

Once again, if we wish to use IrfanView to convert image format, we need only use the appropriate command line switch, resulting in:

'---------------------------------------------------------------------------------------
' Procedure : IrfanView_ConvertImageFormat
' Author    : Daniel Pineault, CARDA Consultants Inc.
' Website   : http://www.cardaconsultants.com
' Purpose   : Convert the image format using IrfanView automation
' Copyright : The following is release as Attribution-ShareAlike 4.0 International
'             (CC BY-SA 4.0) - https://creativecommons.org/licenses/by-sa/4.0/
' Req'd Refs: None required
'
' Input Variables:
' ~~~~~~~~~~~~~~~~
' sImg      : Fully qualified path and filename of the image to open
'
' Usage:
' ~~~~~~
' Call IrfanView_ConvertImageFormat("C:\Temp\Img01.jpg", "C:\Temp\Img01webp.webp")
' Call IrfanView_ConvertImageFormat("C:\Temp\Img01.jpg", "C:\Temp\Img01.bmp")
'
' Revision History:
' Rev       Date(yyyy-mm-dd)        Description
' **************************************************************************************
' 1         2023-04-19              Initial Release
'---------------------------------------------------------------------------------------
Sub IrfanView_ConvertImageFormat(sImg As String, _
                                 sOutputImg As String)
    On Error GoTo Error_Handler
    Dim sExe                  As String

    sExe = IrfanView_GetExe
    If sExe <> "" Then
        Call Shell(sExe & " """ & sImg & """ /convert=""" & sOutputImg & """", vbNormalFocus)
    Else
        'Couldn't find the exe..., now what?  Throw an error?
    End If

Error_Handler_Exit:
    On Error Resume Next
    Exit Sub

Error_Handler:
    MsgBox "The following error has occurred" & vbCrLf & vbCrLf & _
           "Error Source: IrfanView_ConvertImageFormat" & vbCrLf & _
           "Error Number: " & Err.Number & vbCrLf & _
           "Error Description: " & Err.Description & _
           Switch(Erl = 0, "", Erl <> 0, vbCrLf & "Line No: " & Erl) _
           , vbOKOnly + vbCritical, "An Error has Occurred!"
    Resume Error_Handler_Exit
End Sub

 

Resize an Image Via IrfanView Automation

Resizing an image to a new size can be achieved by doing:

'---------------------------------------------------------------------------------------
' Procedure : IrfanView_ResizeImage
' Author    : Daniel Pineault, CARDA Consultants Inc.
' Website   : http://www.cardaconsultants.com
' Purpose   : Resize an image to a desired size using IrfanView automation
' Copyright : The following is release as Attribution-ShareAlike 4.0 International
'             (CC BY-SA 4.0) - https://creativecommons.org/licenses/by-sa/4.0/
' Req'd Refs: None required
'
' Input Variables:
' ~~~~~~~~~~~~~~~~
' sImg      : Fully qualified path and filename of the image to open
' sOutputImg: Fully qualified path and filename to save the resized image as
' lWidth    : Desired maximum width of the resized image
' lHeight   : Desired maximum height of the resized image
'
' Usage:
' ~~~~~~
' Call IrfanView_ResizeImage("C:\Temp\Img01.jpg", "C:\Temp\Img01-Resized.jpg", 200, 300)
'
' Revision History:
' Rev       Date(yyyy-mm-dd)        Description
' **************************************************************************************
' 1         2023-04-19              Initial Release
'---------------------------------------------------------------------------------------
Sub IrfanView_ResizeImage(sImg As String, _
                          sOutputImg As String, _
                          lWidth As Long, _
                          lHeight As Long)
    On Error GoTo Error_Handler
    Dim sExe                  As String

    sExe = IrfanView_GetExe
    If sExe <> "" Then
        Call Shell(sExe & " """ & sImg & """ /aspectration /resample /resize=(" & _
                   lWidth & "," & lHeight & ") /convert=""" & sOutputImg & """", vbNormalFocus)
    Else
        'Couldn't find the exe..., now what?  Throw an error?
    End If

Error_Handler_Exit:
    On Error Resume Next
    Exit Sub

Error_Handler:
    MsgBox "The following error has occurred" & vbCrLf & vbCrLf & _
           "Error Source: IrfanView_ResizeImage" & vbCrLf & _
           "Error Number: " & Err.Number & vbCrLf & _
           "Error Description: " & Err.Description & _
           Switch(Erl = 0, "", Erl <> 0, vbCrLf & "Line No: " & Erl) _
           , vbOKOnly + vbCritical, "An Error has Occurred!"
    Resume Error_Handler_Exit
End Sub

 

Rotate an Image Via IrfanView Automation

Rotating an image is done in 90 degree increments to either the Left or Right.

'---------------------------------------------------------------------------------------
' Procedure : IrfanView_RotateImage
' Author    : Daniel Pineault, CARDA Consultants Inc.
' Website   : http://www.cardaconsultants.com
' Purpose   : Rotate an image using IrfanView automation
' Copyright : The following is release as Attribution-ShareAlike 4.0 International
'             (CC BY-SA 4.0) - https://creativecommons.org/licenses/by-sa/4.0/
' Req'd Refs: None required
'
' Input Variables:
' ~~~~~~~~~~~~~~~~
' sImg      : Fully qualified path and filename of the image to open
' sOutputImg: Fully qualified path and filename to save the resized image as
' lDirection: Desired maximum width of the resized image
'               1=>Right 90deg, 2=>Left 90deg
'
' Usage:
' ~~~~~~
' Call IrfanView_RotateImage("C:\Temp\Img01.jpg", "C:\Temp\Img01-RotatedRight.jpg", 1)
' Call IrfanView_RotateImage("C:\Temp\Img01.jpg", "C:\Temp\Img01-RotatedLeft.jpg", 2)
'
' Revision History:
' Rev       Date(yyyy-mm-dd)        Description
' **************************************************************************************
' 1         2023-04-19              Initial Release
'---------------------------------------------------------------------------------------
Sub IrfanView_RotateImage(sImg As String, _
                          sOutputImg As String, _
                          lDirection As Long)
    On Error GoTo Error_Handler
    Dim sExe                  As String

    sExe = IrfanView_GetExe
    If sExe <> "" Then
        If lDirection = 1 Then
            Call Shell(sExe & " """ & sImg & """ /rotate_r /convert=""" & _
                       sOutputImg & """", vbNormalFocus)
        ElseIf lDirection = 2 Then
            Call Shell(sExe & " """ & sImg & """ /rotate_l /convert=""" & _
                       sOutputImg & """", vbNormalFocus)
        Else
            'Wrong entry, now what?  Throw an error?
        End If
    Else
        'Couldn't find the exe..., now what?  Throw an error?
    End If

Error_Handler_Exit:
    On Error Resume Next
    Exit Sub

Error_Handler:
    MsgBox "The following error has occurred" & vbCrLf & vbCrLf & _
           "Error Source: IrfanView_RotateImage" & vbCrLf & _
           "Error Number: " & Err.Number & vbCrLf & _
           "Error Description: " & Err.Description & _
           Switch(Erl = 0, "", Erl <> 0, vbCrLf & "Line No: " & Erl) _
           , vbOKOnly + vbCritical, "An Error has Occurred!"
    Resume Error_Handler_Exit
End Sub

 

Flip an Image Via IrfanView Automation

Flipping an image is equally simple and can be done either vertically or horizontally as illustrated in the procedure below:

'---------------------------------------------------------------------------------------
' Procedure : IrfanView_FlipImage
' Author    : Daniel Pineault, CARDA Consultants Inc.
' Website   : http://www.cardaconsultants.com
' Purpose   : Rotate an image using IrfanView automation
' Copyright : The following is release as Attribution-ShareAlike 4.0 International
'             (CC BY-SA 4.0) - https://creativecommons.org/licenses/by-sa/4.0/
' Req'd Refs: None required
'
' Input Variables:
' ~~~~~~~~~~~~~~~~
' sImg      : Fully qualified path and filename of the image to open
' sOutputImg: Fully qualified path and filename to save the resized image as
' lDirection: Desired maximum width of the resized image
'               1=>Flip Horizontally, 2=>Flip Vertically
'
' Usage:
' ~~~~~~
' Call IrfanView_FlipImage("C:\Temp\Img01.jpg", "C:\Temp\Img01-FlippedH.jpg", 1)
' Call IrfanView_FlipImage("C:\Temp\Img01.jpg", "C:\Temp\Img01-FlippedH.bmp", 1)
' Call IrfanView_FlipImage("C:\Temp\Img01.jpg", "C:\Temp\Img01-FlippedV.jpg", 2)
'
' Revision History:
' Rev       Date(yyyy-mm-dd)        Description
' **************************************************************************************
' 1         2023-04-19              Initial Release
'---------------------------------------------------------------------------------------
Sub IrfanView_FlipImage(sImg As String, _
                          sOutputImg As String, _
                          lDirection As Long)
    On Error GoTo Error_Handler
    Dim sExe                  As String

    sExe = IrfanView_GetExe
    If sExe <> "" Then
        If lDirection = 1 Then
            Call Shell(sExe & " """ & sImg & """ /hflip /convert=""" & _
                       sOutputImg & """", vbNormalFocus)
        ElseIf lDirection = 2 Then
            Call Shell(sExe & " """ & sImg & """ /vflip /convert=""" & _
                       sOutputImg & """", vbNormalFocus)
        Else
            'Wrong entry, now what?  Throw an error?
        End If
    Else
        'Couldn't find the exe..., now what?  Throw an error?
    End If

Error_Handler_Exit:
    On Error Resume Next
    Exit Sub

Error_Handler:
    MsgBox "The following error has occurred" & vbCrLf & vbCrLf & _
           "Error Source: IrfanView_FlipImage" & vbCrLf & _
           "Error Number: " & Err.Number & vbCrLf & _
           "Error Description: " & Err.Description & _
           Switch(Erl = 0, "", Erl <> 0, vbCrLf & "Line No: " & Erl) _
           , vbOKOnly + vbCritical, "An Error has Occurred!"
    Resume Error_Handler_Exit
End Sub

 

Save the Clipboard Image to A Local File

There are different way to save the clipboard image to a local image file: APIs, use Excel/PowerPoint to insert a shape and then export it, … but Irfanview does it easier and offers to save it in any format you want, all with a single line of code!

'---------------------------------------------------------------------------------------
' Procedure : IrfanView_SaveClipboard
' Author    : Daniel Pineault, CARDA Consultants Inc.
' Website   : http://www.cardaconsultants.com
' Purpose   : Save the clipboard image as an image on your hard drive
' Copyright : The following is release as Attribution-ShareAlike 4.0 International
'             (CC BY-SA 4.0) - https://creativecommons.org/licenses/by-sa/4.0/
' Req'd Refs: None required
'
' Input Variables:
' ~~~~~~~~~~~~~~~~
' sOutputImg: Fully qualified path and filename to save the resized image as
'
' Usage:
' ~~~~~~
' Call IrfanView_SaveClipboardImage("C:\Temp\Img01.jpg")
' Call IrfanView_SaveClipboardImage("C:\Temp\Img01.png")
' Call IrfanView_SaveClipboardImage("C:\Temp\Img01.bmp")
'
' Revision History:
' Rev       Date(yyyy-mm-dd)        Description
' **************************************************************************************
' 1         2023-09-26              Initial Release
'---------------------------------------------------------------------------------------
Sub IrfanView_SaveClipboardImage(sOutputImg As String)
    On Error GoTo Error_Handler
    Dim sExe                  As String

    sExe = IrfanView_GetExe
    'Or Hardcode the loaction if you prefer by doing:
    'sExe = "C:\Program Files\IrfanView\i_view64.exe"
    If sExe <> "" Then
        Call Shell(sExe & " /clippaste /convert=""" & _
                   sOutputImg & """", vbNormalFocus)
    Else
        'Couldn't find the exe..., now what?  Throw an error?
    End If

Error_Handler_Exit:
    On Error Resume Next
    Exit Sub

Error_Handler:
    MsgBox "The following error has occurred" & vbCrLf & vbCrLf & _
           "Error Source: IrfanView_SaveClipboardImage" & vbCrLf & _
           "Error Number: " & Err.Number & vbCrLf & _
           "Error Description: " & Err.Description & _
           Switch(Erl = 0, "", Erl <> 0, vbCrLf & "Line No: " & Erl) _
           , vbOKOnly + vbCritical, "An Error has Occurred!"
    Resume Error_Handler_Exit
End Sub

 

Combining Multiple Actions

If you wish to combine multiple manipulations, as illustrated in IrfanView_ResizeImage(), you need only add the additional command line swicth(es) to your call. So no need to call multiple individual procedures, instead, for best performance, create a new procedure and build everything into a single command!

So yes, you could flip, resize and convert all in one single sub.
 

Important!

If you review the IrfanView_ConvertImageFormat() and then the subsequent examples you will notice no doubt that they all use the /convert command line switch as it is used to not only convert format, but also as the save command. Thus, in reality, you can not only perform the desired operation (rotate, flip, resize, …), but you can at the same time convert the file format if so desired based on the supplied sOutputImg (extension).

Hence you can output the altered image file in the same format, or convert it in the same call. The choice is yours.

Also, the automation automatically overwrites existing files. So if you wish to avoid this, you will need to add in your own check prior to calling the Shell process by using any number of techniques: Dir(), FSO, …
 

Other Command Line Switches

Below is the listing of available command line switches taken from the help file (found under the heading Command Line Options).

These command line options are supported in IrfanView:
 
/one -        						force 'Only one instance' 
/fs -       						force Full Screen display 
/bf -        						force 'Fit images to desktop' display option 
/title=text -        				set window title to 'text' 
/pos=(x,y) -        				move the window to x,y (if display option allows that) 
/display=(x,y,w,h,zoom,sX,sY) -     set position, size, zoom and scroll position of the IrfanView window and image 
/convert=filename -        			save/convert input image(s)/file(s) to "filename" and CLOSE IrfanView  
										(see Pattern page for additional filename options)
/makecopy -        					for convert: if destination file exists, save new file as copy: (1), (2), (3) etc. 
/slideshow=txtfile -        		play slideshow with the files from 'txtfile' 
/slideshow=folder -        			play slideshow with the files from 'folder' 
/reloadonloop -        				reload input source used in /slideshow when list finished 
/filelist=txtfile -        			use filenames from "txtfile" as input, see examples below 
/file=filename(s) -        			use filename(s) as input, see examples below 
/thumbs -        					open Thumbnails window 
/killmesoftly -       				close all IrfanView instances (exit after command line) 
/cmdexit -        					close current IrfanView after command line processing 
/fs_exit -        					ESC closes fullscreen and IrfanView (if started in fullscreen mode) 
/closeslideshow -        			close slideshow and close IrfanView after the last image 
/page=X -        					open page number X from a multipage input image 
/crop=(x,y,w,h,C) -        			crop input image: x-start, y-start, width, height, C-start corner (0-4) 
/print -        					print input image to default printer and close IrfanView 
/print="Name" -        				print input image to specific printer and close IrfanView 
/resize=(w,h) -        				resize input image to w (width) and h (height) 
/resize_long=X -        			resize input image: set long side to X 
/resize_short=X -        			resize input image: set short side to X 
/resample -        					for resize: use Resample option (better quality) 
/aspectratio -        				used for /resize, keep image proportions 
/capture=X -        				capture the screen or window (see examples below) 
/ini -        						use the Windows folder for INI/LST files (read/save) 
/ini="Folder" -        				use the folder "Folder" for INI/LST files (read/save) 
/clippaste -        				paste image from the clipboard 
/clipcopy -        					copy image to the clipboard 
/silent -        					don't show error messages for command line read/save errors 
/invert -        					invert the input image (negative) 
/dpi=(x,y) -        				change DPI values, set DPIs for scanning 
/scan -        						acquire the image from the TWAIN device - show TWAIN dialog 
/scanhidden -        				acquire the image from the TWAIN device - hide TWAIN dialog 
/batchscan=(options) -        		simulate menu: File->Batch Scanning, see examples below 
/bpp=BitsPerPixel -        			change color depth of the input image to BitsPerPixel 
/swap_bw -        					swap black and white color 
/gray -        						convert input image to grayscale 
/rotate_r -        					rotate input image to right 
/rotate_l -        					rotate input image to left 
/hflip -        					horizontal flip 
/vflip -        					vertical flip 
/filepattern="x" -        			browse only specific files 
/sharpen=X -        				open image and apply the sharpen filter value X 
/effect=(X,p1,p2) -        			apply effect filter X, see below for examples 
/contrast=X -        				open image and apply the contrast value X 
/bright=X -        					open image and apply the brighntess value X 
/gamma=X -        					open image and apply the gamma correction value X 
/advancedbatch -        			apply Advanced Batch Dialog options to image (from INI file) 
/hide=X -        					hide toolbar, status bar, menu and/or caption of the main window (see examples below) 
/transpcolor=(r,g,b) -        		set transparent color if saving as GIF/PNG/ICO 
/info=txtfile -        				write image infos to "txtfile" 
/fullinfo -        					used for /info, write EXIF, IPTC and Comment data 
/shortinfo -        				used for /info, write just file index and name 
/append=tiffile -        			append image as (TIF) page to "tiffile" 
/multitif=(tif,files) -        		create multipage TIF from input files 
/multipdf=(pdf,files) -        		create multipage PDF from input files 
/panorama=(X,files) -        		create panorama image from input files; X = direction (1 or 2) 
/jpgq=X -        					set JPG save quality 
/tifc=X -        					set TIF save compression 
/wall=X -        					set image as wallpaper; see below for /random and examples 
/extract=(folder,ext) -        		extract all pages from a multipage/multiframe file 
/import_pal=palfile -        		import and apply a special palette to the image (PAL format) 
/export_pal=palfile -        		export image palette to file (PAL format) 
/jpg_rotate=(options) -        		JPG lossless rotation, see examples below 
/hotfolder="folder" -        		start Hotfolder option with a specific folder 
/monitor=X -        				start EXE-Slideshow on monitor X  
/window=(x,y,w,h) -        			set EXE-Slideshow window position and size 
/clearmonitors -        			play EXE-slideshow on one monitor, clear all other monitors

Please refer to the help for further information and detailed usage examples.
 

Useful Resources