Announcement

Collapse
No announcement yet.

Watermark from Command Line ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Watermark from Command Line ?

    Hi - Please can some one help me with the Advanced Batch options when using IrfanView from the command Line? I can't get the watermark feature working in command line mode (though works fine in GUI batch mode), and there seems to be nowhere in the ini file to specify the location of the watermark.

    I am using IrfanView from a Windows batch file - here I am working on all .tif files within the 'c:\photo' folder:

    for /r "c:\photo\tif" %%I in (*.tif) do (
    "C:\Program Files\IrfanView\i_view32.exe" %%~fnxI /advancedbatch /ini="c:\photo\ini\" /jpgq=73 /convert=c:\photo\out\%%~nI.jpg
    )

    Also I want to keep the XMP, EXIF and IPTC markers, but can't see a way to select this via the command line apart from with the jpeg rotate options, which I don't really need.

    Regards, Tim Makins
    Travel Photography - www.gnomeplanet.com

    #2
    Looking in my i_view32.ini file there is a data block for AddWatermark and another for BatchWatermark.
    The settings in mine are currently

    Code:
    [AddWatermark]
    AddFileFolder=C:\Users\Mike\Desktop\Capture\
    Coord=0;0;
    Corner=0
    Transp=0
    Image=C:\Users\Mike\Desktop\Capture\Frimley Park.png
    
    [BatchWatermark]
    Coord=100;100;
    Corner=3
    Transp=30
    Image=C:\Users\Mike\Desktop\Overlay investigation\Overlay 200x150.jpg
    So it will be the BatchWatermark settings that get used by the /AdvancedBatch command line option.
    The usual way to set up an INI file to be called from the Command line is to perform the operation on a single test file in the GUI. Then close Irfanview and copy the current INI file into a new folder that you can call when you need it.
    If you want to use /Advancedbatch in your Command line then set up a Batch Conversion/Rename operation in the GUI with all the settings you want to use. If you are going to convert to a jpeg file in your Command line then make sure you set JPEG as the Output format in the GUI, click the Options button alongside and tick the selections for keeping those metadata types you want. You could also set the JPG quality you want to use there. If you keep that jpgq=73 option in your Command line though it will use that instead.

    Note: Use the latest version of Irfanview (currently 4.35). If you really are still using v4.00 as it says in your profile then Watermark is not implemented.
    Last edited by Mij; 08.05.2013, 09:46 PM. Reason: Note added

    Comment


      #3
      Great Mij - thanks very much - that solved the watermark problem, but I still cannot get my IPTC data passed across. I tried this using the standard IrfanView windows program, verion 4.35 with Windows XP from the desktop, and it still doesn't work. Here's what I did:
      Start Irfanview. Open a tif and press I. On the info panel for IPTC it is showing values for Author, Date Created, City, Province-State, Country.
      Click File > Save As > Save As Type > JPG, and in the JPG Save Options window make sure that Keep Orignal EXIF data, Keep Original IPTC data, Keep Original JPG Comment, Keep Original XMP data, and RESET EXIF Orientation Tag are all checked. Click Save, then open the saved jpg, press I > IPTC Info, and all the previous values are missing.

      The JPG section of my ini file shows:
      [JPEG]
      Load Grayscale=0
      ExifRotate=1
      Save Quality=73
      Save Progressive=0
      Save Grayscale=0
      NoSampling=0
      KeepExif=1
      KeepCom=1
      KeepIptc=1
      ExifOrient=1
      SetSize=0
      FileSize=65.00
      KeepXmp=1
      KeepQuality=0

      Incidentally, how do I look at the XMP tags in IrfanView ?

      Excuse my delay in replying - I can not get to the internet every day.

      Regards, Tim Makins.

      Comment


        #4
        AFAIK what you are trying to do is not possible. In general Irfanview does not support transferring metadata from one file type to another, nor does it support either reading or writing of XMP data in any file types. Editing metadata is not a strong point of irfanview.
        It will though usually allow you to retain metadata that is already embedded if you save again in the same file type that you opened.

        Comment


          #5
          OK - thats a pity, but at least I know its not just me !!! I can do this with EXIFtool, its just another process to add when resizing photos, which I was hoping to avoid. Maybe it will be added to Irfanview in the future?

          Best wishes and many thanks for taking the trouble to reply, Tim Makins

          Comment

          Working...
          X