Announcement

Collapse
No announcement yet.

Image resize output path hash / number sign is converted to 1

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

    Image resize output path hash / number sign is converted to 1

    Hi! I am using i_view64.exe to do command-line resizing. I have a problem with the output path. When it contains # (hash / number sign) then the hash is converted to '1'. My command:

    i_view64.exe "C:\input\image #2 40.jpg" /resize=(1600, 0) /silent /jpgq=80 /aspectratio /resample /convert="C:\output\image #2 40.jpg_Large.jpg" /ini="C:\path\to\ini"

    In the output folder I am getting a file named "image 12 40.jpg_Large.jpg". Is this some kind of feature that I don't know about or is this a bug? I tried version 4.5 and 4.54.

    #2
    Irfanview uses the # sign as a placeholder for a counter. The number of #s is the number of the digits that will come out.
    E.g. ### stands for 001 to 999.
    I use this function to number screenshots.
    Win 10/64 Home 22H2 IrfanView 4.66/64
    Hate has caused a lot of problems in this world, but it has not solved one yet. (Maya Angelou)

    Comment


      #3
      Thanks Kuki. That makes sense. Is there a way to escape the hash sign in output path? I use irfanview with files that I do not control (so filenames and their output path may contain arbitrary number of hash signs). Replacing the numbers back to hashes would be quite cumbersome in my case.

      Comment


        #4
        I assume that this behaviour is hard coded in iview_32.exe/i_view64.exe, so there will be no way to escape this function. If possible, use a decent tool
        to replace # with another sign, e.g. !. After using IrfanView you can then do it the other way round.
        You may also write to Irfan Skiljan and ask if he has a more elegant solution. See Help - About for his e-mail adress.
        Win 10/64 Home 22H2 IrfanView 4.66/64
        Hate has caused a lot of problems in this world, but it has not solved one yet. (Maya Angelou)

        Comment


          #5
          Thanks, I contacted Irfan and he directed me in the right direction - I run 2 replacements:
          $ --> $$
          # --> $#
          (in the output path)
          This seems to do the trick. $ is a kind of escape character it seems.

          Comment


            #6
            Andy250, thank you for sharing Irfan's answer with us. I might help others wit a similar problem.
            Win 10/64 Home 22H2 IrfanView 4.66/64
            Hate has caused a lot of problems in this world, but it has not solved one yet. (Maya Angelou)

            Comment


              #7
              This behavior was not in version 4.27 This is something that was added since that version. I upgraded to version 4.54 when I implemented Windows 10. This is giving me a real headache as I now have to rewrite all my scripts and all calls to irfanview in my applications. Is there some other switch in the command line to turn off this behavior?

              Comment


                #8
                Either install 4.27 and use that, or contact Irfan Skiljan to see if he can offer any suggestions.
                Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

                Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

                Comment


                  #9
                  There is a very handy option $N that when used in the /convert= string will duplicate the original file name without implementing the # substitution.

                  In this case you could do the following:

                  i_view64.exe "C:\input\image #2 40.jpg" /resize=(1600, 0) /silent /jpgq=80 /aspectratio /resample /convert="C:\output"$N"_Large.jpg" /ini="C:\path\to\ini"

                  Your result would be a file named "image #2_Large.jpg" in folder "C:\output"

                  Comment

                  Working...
                  X