Installing IrfanView to view imagesΒΆ

The pixDisplay() function is used throughout liblept to display images for debugging purposes. Under Windows this uses the free IrfanView image viewer application. We have to assume the presence of IrfanView because many Leptonica routines don’t use file extensions when naming files. Since Windows depends on the file extension to determine a file’s type (unlike Linux), it is unable to automatically determine what application to use when opening extension-less files. In addition, unlike other Windows image viewers (for example, ACDSee’s Photo Manager), IrfanView will correctly display an image file even if it doesn’t have an extension.

Besides installing IrfanView, you also have to add the location of i_view32.exe (normally C:\Program Files\IrfanView) to your system’s PATH environment variable.

Each time pixDisplay() is called, it will display an image using IrfanView and wait for it to be closed. You can hit the <Escape> key to quickly close IrfanView.

Alternatively, you can manually edit pixDisplayWithTitle() in src\writefile.c to change the executable used to display images under Windows.