Results 1 to 6 of 6

Thread: How to capture error messages from command line

  1. #1
    IV Newbie
    Join Date
    Jan 2018
    Posts
    3
    Version
    IrfanView 4.44
    OS
    64-bit Win 7 Professional SP1
    CPU Cores
    2

    Default How to capture error messages from command line

    Hello,

    When starting irfanview from the command line, how do you capture error messages? For example, let's say I try to open a BMP image file:
    i_view32.exe images\swirl.bmp

    Attempting to load this image results in the following pop up error from irfanview:
    "swirl.bmp: Decode error! Invalid or unsupported BMP file."

    However, irfanview keeps running (no exit error code) and I don't see any error indications from the command line. Is there a way to capture this error from the command line or programmatically via an API?

    Please advise,
    --Jim

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

    Default Exit-Codes

    From i_options.txt: "IrfanView exit code is 0. If /convert or /print is used, there is 1 or 2 also possible, for load/save error."
    No other exit codes (error codes) are documented.
    When the power of love overcomes the love of power, the world will know peace - Jimi Hendrix

  3. #3
    IV Newbie
    Join Date
    Jan 2018
    Posts
    3
    Version
    IrfanView 4.44
    OS
    64-bit Win 7 Professional SP1
    CPU Cores
    2

    Default

    Thank you for the reply. However, that still does not answer my question - when loading an image from the command line where irfanview encounters an error loading the image, is it possible to capture the error message from the command line or via an API?

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

    Default

    If you use Windows command window, you have two options to capture what you see in that window:
    1) you can make a screenshot (this is a Windows feature, please ask if you don't know how) or use Irfanview for a screenshot.
    2) you can mark the text with the mouse, copy the marked text with [CTRL]+[C], and paste the text to an editor or office application to
    save it there.

    Hope this is the help you're looking for.
    When the power of love overcomes the love of power, the world will know peace - Jimi Hendrix

  5. #5
    IV Newbie
    Join Date
    Jan 2018
    Posts
    3
    Version
    IrfanView 4.44
    OS
    64-bit Win 7 Professional SP1
    CPU Cores
    2

    Default

    Hello Kuki,

    Thank you again for the reply. I was hoping for a programmatic solution. Let's say I'm trying to load 1 million images. It would be nice to know which ones failed to load because of some kind of error (for example, an invalid image file). While taking a print screen or manually copying the error text certainly works for hand viewing a few images, I'm sure you'd agree that this would be undesirable to do for viewing a million different image files.

    Also, please let me know if this is the wrong forum to ask this kind of question. Is there one that's better suited for programmatic type questions?

    Best regards,
    --Jim

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

    Default

    Hi Jim,
    I've never used Irfanview command line options. But I've I taught myself how to use MS-DOS. So I know some tricks.
    Don't know is this works with Irfanview, but you can try to add "> faults.txt" (without "") to paste all Irfanview output to a text file.
    You won't see any output in the command window then. Irfanview is ready when you see the prompt appears again.
    When the power of love overcomes the love of power, the world will know peace - Jimi Hendrix

Thread Information

Users Browsing this Thread

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

Posting Permissions

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