Announcement

Collapse
No announcement yet.

Commandline /effect does not work

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

    Pending Commandline /effect does not work

    Hardware and sofware specs:

    Windows 7 Enterprise SP1 64 bits
    Intel Core i& CPU 860 2.8Ghz
    RAM 4Gb
    IrfanView 4.37


    Symptoms:


    When using the commandline, effect 39 (color-temperature) does not work. The destination picture is not converted.
    It opens irfanview with effect 38.
    I also tested some other effects, but none of them seems to work from the commandline.


    The commandline syntax I used:

    First I copied IMG_9523.JPG to "C:\Program Files (x86)\IrfanView\"
    Then I ran the command:
    cd "C:\Program Files (x86)\IrfanView\"
    i_view32.exe IMG_9523.JPG /convert=$N_cust_iview.JPG /effect=(39,9000,0)

    or

    cd "C:\Users\test\pictures"
    "C:\Program Files (x86)\IrfanView\i_view32.exe" IMG_9523.JPG /convert=$N_cust_iview.JPG /effect=(39,9000,0)

    #2
    I would not expect any command to work in C:\Program Files\

    Try working in C:\TEMP where the OS lets you write files.
    Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

    Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

    Comment


      #3
      So I copied the image to c:\temp

      cd "c:\temp"
      "C:\Program Files (x86)\IrfanView\i_view32.exe" IMG_9523.JPG /convert=$N_cust_iview.JPG /effect=(39,9000,0)

      And now I got the message: Error! Can't load: 'IMG_9523.JPG'

      I renamed the file to lower case (since I read on the forum that capitals are not always accepted).

      cd "c:\temp"
      "C:\Program Files (x86)\IrfanView\i_view32.exe" img_9523.jpg /convert=$N_cust_iview.jpg /effect=(39,9000,0)

      But the same message: Error! Can't load: 'img_9523.jpg'

      Comment


        #4
        It cannot find the image file in the IrfanView Program Files folder

        "C:\Program Files (x86)\IrfanView\i_view32.exe" C:\TEMP\img_9523.jpg /convert=$N_cust_iview.jpg /effect=(39,9000,0)

        will do the first command changing the file name.

        "C:\Program Files (x86)\IrfanView\i_view32.exe" C:\TEMP\img_9523.jpg /effect=(39,9000,0)

        will apply the effect to img_9523.jpg and open it in IrfanView.

        Command lines are tricky, which is why I never use them. You have to know the correct syntax. Maybe someone who has more experience with them will pass by soon.
        Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

        Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

        Comment


          #5
          A few notes that might perhaps make the Command line less "tricky".

          cd "C:\Program Files (x86)\IrfanView\"
          i_view32.exe IMG_9523.JPG /convert=$N_cust_iview.JPG /effect=(39,9000,0)

          The command line interpreter (cmd.exe) reads the first statement in the line (i_view32.exe) and recognises it to be an executable file. Cmd.exe is able to emulate DOS and searches for the folder that i_view32.exe is in using the DOS system variables Path (%Path%) and Current Directory (%CD%), which you have here set to "C:\Program Files (x86)\ IrfanView".
          It opens and runs a non-visible copy of Irfanview as a subroutine. The remainder of the line is passed to the sub-routine, Irfanview, as arguments.

          Now comes a problem because Irfanview is running under Windows and %CD% is not normally visible to Windows programs. Irfanview does know what folder it was launched from though and assumes that is where it will find IMG_9523.JPG and where to place the converted file $N_cust_iview.JPG. So that would have worked were it not for the fact that Windows 7 UAC will not allow a program running without Administrator privileges to save a file in the Program Files directories, as Bhikkhu Pesala pointed out.

          cd "C:\Users\test\pictures"
          "C:\Program Files (x86)\IrfanView\i_view32.exe" IMG_9523.JPG /convert=$N_cust_iview.JPG /effect=(39,9000,0)

          You can probably now see why this does not work. Irfanview is still looking for IMG_9523.JPG in C:\Program Files (X86) folder because it knows nothing about the DOS Current Directory you set. You could have written it as

          cd "C:\Users\test\pictures"
          "C:\Program Files (x86)\IrfanView\i_view32.exe" %CD%\IMG_9523.JPG /convert=%CD%\$N_cust_iview.JPG /effect=(39,9000,0)

          Cmd.exe would have replaced %CD% with C:\Users\test\pictures before passing the arguments to Irfanview and all would have been well.

          Comment


            #6
            @Bhikkhu Pesala: When I do this, the picture is opened in IrfanView. When selecting effect 39, it is opening it with effect 38.

            @My: Same result when copying the image to the c:\program files (x86)\Irfanview folder....

            Comment


              #7
              Originally posted by polleke View Post
              @Bhikkhu Pesala: When I do this, the picture is opened in IrfanView. When selecting effect 39, it is opening it with effect 38.
              Yes, that seems to be the case. 37 or other lower numbers work, but 38 and 39 give the same results.

              Please send a bug report to Irfan Skiljan as you will know how to explain it more clearly than I do.
              Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

              Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

              Comment


                #8
                Just got feedback from Irfan:
                1.) effect 39 will be added in the next release.
                2.) The /convert option needs to be added at the end, so: "C:\Program Files (x86)\IrfanView\i_view32.exe" %CD%\IMG_9523.JPG /effect=(39,9000,0) /convert=%CD%\$N_cust_iview.JPG

                Comment


                  #9
                  Thanks for the feedback. I have updated the thread. We will expect the fix in the next release.
                  Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

                  Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

                  Comment

                  Working...
                  X