Results 1 to 9 of 9

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

  1. #1

    Question 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. #2
    Multiple User Kuki Dent's Avatar
    Join Date
    Jun 2010
    Location
    Germany, Lower Saxony
    Posts
    249
    Version
    IrfanView 4.51
    OS
    64-bit Win 10
    CPU Cores
    4

    Default

    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 v2004 IrfanView 4.54/32
    Hate has caused a lot of problems in this world, but it has not solved one yet. (Maya Angelou)

  3. #3

    Default

    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.

  4. #4
    Multiple User Kuki Dent's Avatar
    Join Date
    Jun 2010
    Location
    Germany, Lower Saxony
    Posts
    249
    Version
    IrfanView 4.51
    OS
    64-bit Win 10
    CPU Cores
    4

    Default

    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 v2004 IrfanView 4.54/32
    Hate has caused a lot of problems in this world, but it has not solved one yet. (Maya Angelou)

  5. #5

    Default

    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.

  6. #6
    Multiple User Kuki Dent's Avatar
    Join Date
    Jun 2010
    Location
    Germany, Lower Saxony
    Posts
    249
    Version
    IrfanView 4.51
    OS
    64-bit Win 10
    CPU Cores
    4

    Default

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

  7. #7
    IV Newbie
    Join Date
    May 2020
    Posts
    7
    OS
    Win 10
    CPU Cores
    8

    Default

    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?

  8. #8
    Moderator Enterprise User Bhikkhu Pesala's Avatar
    Join Date
    May 2007
    Location
    East London
    Posts
    6,499
    OS
    64-bit Win 10
    CPU Cores
    1

    Default

    Either install 4.27 and use that, or contact Irfan Skiljan to see if he can offer any suggestions.

  9. #9
    IV Newbie
    Join Date
    May 2020
    Posts
    7
    OS
    Win 10
    CPU Cores
    8

    Default

    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"

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •