Announcement

Collapse
No announcement yet.

IrfanView command line fails to convert image, when path has double space

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

    Reported IrfanView command line fails to convert image, when path has double space

    IrfanView command line fails to convert image when the path to the image contains double space.

    Example: i_view32.exe "c:\folder with double space\test.bmp" /convert=c:\giftest.gif

    I have a script that converts images, and this script fails if someone is using this script to convert images that resides inside a folder with double space in the folder name.

    #2
    I tried to reproduce this problem using a batch file. I do not mess around in the root folder of the drive though so I did put both the folder with spaces in its name and giftest.gif in my user folders. It worked without any problem even when I replaced one of the 3 single spaces in your example with a real double space in case that is what you meant.

    It is very easy to make a mistake though and not have quite the same name for the folder as you have put in your command line. The spaces are not ignored. They must be identical in both places and you do not necessarily see any Error messages that Irfanview may generate when you include that /convert option.

    I suggest that you take it a step at a time.
    1. Just try the i_view32.exe part and make sure the Irfanview window opens
    2. Try i_view32.exe "c:\folder with double space\test.bmp" and make sure that the test.bmp image is displayed without any Irfanview error messages.
    3. If it is still working open Irfanview and change the GIF save options by checking "Save transparent color" and save that.
    4.Then try your full command line again and see if the GIF dialog opens asking you to select the transparent color. Click somewhere on the image and see if the Gif image is saved.

    I think by then you will have discovered what is actually going wrong.

    Comment


      #3
      I have investigated this further and I found that this is not a bug in IrfanView. I was running the command line from a Java program using Runtime.getRuntime().exec(command).

      When I run the command in the command prompt, then I am not able to reproduce the error. I guess I was fooled by that the error message came from IrfanView.

      I am sorry for not checking out this in the first place.

      Comment

      Working...
      X