Monday, October 19, 2009

Software serna Loves: IrfanView

IrfanView is a free image viewing application. It can also be used to edit images—and in fact has some pretty great editing features—but it’s primary purpose is for viewing. It’s named after its creator, Irfan Skiljan.



What makes IrfanView great?

First of all it’s fast. For all of the image types I’ve tried it on (JPG, GIF, bitmap, PNG, etc.), when you open an image in IrfanView, it opens instantly. There’s no millisecond or multi-second delay, as you wait for the program to initialize itself, or load libraries—just double-click the image, and IrfanView is there, showing it. Even for a very large image, which IrfanView might have to resize for you, it’s still much faster than any other image viewing application I’ve used. If all you want to do is look at an image—and that is probably what you’re doing, much more often than editing—having it load up quickly is a big benefit. In fact, even the “filmstrip” view, built right into Windows Explorer—which caches all of the images ahead of time—is only marginally faster for really big images, even with its cache, and is actually slower for medium or small images.

This makes IrfanView feel “lightweight.” I don’t have to hesitate before opening an image file, even a really big one, because there is no penalty for doing so; I won’t lose a ton of memory, my CPU won’t go crazy, and I won’t have to waste time waiting for the image to appear. If I want to open a Word document, or a Visio drawing, I might have second thoughts, and only open it if I have to, but I don’t have to give such considerations to opening an image.

Earlier, I mentioned resizing, and this is another handy feature built into IrfanView. You can tell IrfanView how you want to view the images that you’re opening, meaning:

  • Fit window to image (also called 1:1 ratio). The image will be shown at its normal size, with no scaling applied; if the image is small the IrfanView window will shrink down to the image’s size, and if it’s very big IrfanView will grow to the size of your screen, and give you scrollbars to see whatever doesn’t fit on the screen.
  • Fit images to desktop. IrfanView will size itself as big as your desktop, and if the image is very small it will be resized bigger to fill the screen, or if it’s very big it will be shrunk to fit on the screen. (Because of the nature of this type of activity, obviously small images can get very distorted when they’re expanded this way; medium-sized pictures—especially photographs—sometimes don’t look too bad. Sizing larger images to be smaller, however, gives very good results.)
  • Fit images to window. Similar in concept to fitting the image to the desktop, but fitting the image to whatever size your IrfanView window is. This is the only option in which IrfanView will not resize its window to the size of your image or your desktop.
  • Fit only big images to desktop, or Fit only big images to window. Similar to the above, in which very big images will be resized to fit the screen (or the window), but small images are left as they are.
There are some other options too, but these are the main ones. Personally, I usually have IrfanView set to “Fit only big images to desktop”; usually, if I’m looking at an image, I’d prefer to see the whole thing at once, but that doesn’t mean that I need smaller images expanded. And, as mentioned, you get very good results when you shrink an image to fit the desktop, it doesn’t become distorted or anything. If I ever change my mind—for example, if I want to see all of the details for a large image, and want to use the 1:1 ratio—it’s a simple menu to change the way I’m viewing the image, and IrfanView will remember the setting the next time I open it. I don’t have to open a Preferences dialog, and make the selection there, and click OK to save my settings; just change the view, and it’s done. Also, because of the speed of the application, there’s not a noticeable performance impact to having IrfanView resize the image.

If I ever want to zoom in or out of a an image, without changing IrfanView’s overall setting for viewing images, I can use the + key to zoom in or the - key to zoom out. (Or, if I want to look at a specific portion of an image, I can select it with the mouse, and then click the selected portion. IrfanView will crop the image to show just that section. It’s not a “permanent” crop—it doesn’t actually edit the image itself—it’s just for your viewing pleasure. You can “reload” the image to see the full thing again.)

This next feature might not seem like such a big deal, but it’s part of the overall lightweight feel IrfanView has: Pressing the Esc key closes the application. To me, there is just something so simple and elegant to pressing the Esc key, and having the application go away. It goes along with what I was discussing earlier, that you don’t have to think before viewing an image in IrfanView. Double-click it, look at it, and hit Esc. In your mind, all you’re doing is “looking at an image”; you’re not “opening a program”, and “selecting a file”, and “closing the program”. If you’re having large images scaled down to fit your desktop, you’re not even “using the scrollbars”. You’re just looking at an image, and IrfanView is not making itself known in the process. You can close any program using the keyboard—Alt+F4 will close any program in Windows—but there’s something holistic about a lightweight image viewing program that lets you simply hit Esc to dismiss it. In fact, maybe “dismiss” is the operative word here—you’re not “closing a program” you’re “dismissing” the image you were looking at.

A similar feature is the ability to do an impromptu slideshow, using the left and right arrow keys on the keyboard. If you have multiple images in a particular folder on your computer, and open one of them in IrfanView, you can use the left and right mouse keys to view the next and previous one. (In other words, double-click the first image and it will appear in IrfanView; press the right arrow key, and IrfanView will show the next image; hit the left arrow key, and the first image will be shown again.) Most image viewing applications have a slideshow feature—and IrfanView does as well— but there’s something so intuitive about the ability to simply view the next image by hitting the arrow key. Personally, I never use the slideshow feature in any image viewing program, even IrfanView, because I find it so much easier to simply scroll through the images myself, at my own pace, instead of after a predetermined number of seconds. (Inevitably, when using that type of slideshow, I find myself having to manually go back and look at an image, because the slideshow moved on before I was done looking, or find myself impatiently waiting for the next image to appear when I don’t care much about the current one.) I suppose if I were doing a tradeshow it might be nice to have images automatically scrolling past the screen as eye candy, or maybe it would be nice to have something like that playing at a party (maybe with pictures from a recent trip), but for my own use, I simply use the left and right keys.

Along the same lines, you can view an image in “full screen” mode—meaning that only the image will be shown, not the rest of your applications and your Windows taskbar and your desktop—by simply hitting Enter. Again, so elegant! When you’re done with full screen mode, hitting Esc again will bring it back to normal. (As with using the regular window, you have options as to how you want the pictures to be scaled (or not scaled) in full-screen mode, but in this case there is no menu, so you really do have to use the Preferences dialog to set this.)

Now, although IrfanView is primarily built for viewing pictures, it has some editing features that I’ll just briefly mention:
  • Of course it can easily crop images, but so can any image manipulation program out there, and most image viewers. (I mentioned the ability to “temporarily crop” an image for viewing, but you can do a “real” crop as well, and save your changes.)
  • It has the ability to do a batch rename of a bunch of pictures. For example, suppose you go on a trip to Florida, you get all the pictures off your camera, and have them in a directory, but they’re all named something like IMG00079.jpg, IMG00080.jpg, IMG00081.jpg, etc. You can use IrfanView’s batch rename function to give them all more meaningful names; maybe Florida_01.jpg, Florida_02.jpg, Florida_03.jpg, etc.
    • For a simple rename of one particular file, another handy keyboard shortcut: simply hit the S key, and IrfanView will bring up the “Save As” window, so you can give the image a new name (or save it in a different format; e.g. you could use this to convert a JPG to a GIF.)
  • You can very easily rotate an image, using the R and L keys (to rotate right and left, respectively), for those cases where you tilted your camera to the side, so your pictures are sideways.
  • There are many settings for adjusting the brightness or contrast of the picture, editing the colour scheme, applying effects like blur, etc.
  • Similar to the batch rename feature, I can also generate a set of “thumbnails.” If I have a number of images in a directory, I can have IrfanView go through that directory, and for each image, it will create a “thumbnail” image—a smaller version of the image. This might be useful if you were creating a website, and you wanted to have small previews of the pictures, and when someone clicks the preview you show them the real, full-sized image.
  • Finally—and I never discovered this feature until I was writing this post!—IrfanView can do screenshots which include the mouse. It’s very easy in Windows to do a screenshot—use the PrtScn key to get the whole desktop, or Alt+PrtScn to get just the active window—but you can’t get the mouse that way. If you want to get a screenshot which shows the user using a particular menu, for example, you can’t do it. So until now, I’ve been using other programs like Snagit for that type of work, but they cost money. I’ve now realized that IrfanView can do it too, and it’s free.


I’ve mentioned the simplicity of the keyboard shortcuts a couple of times; maybe you’re wondering why I think it’s such a big deal that you can rotate an image right in IrfanView by hitting the R key, instead of Ctrl+R or Alt+R. Why I’m so thrilled to be able to close the application using the Esc key, instead of Alt+F4. (Of course, you can still use Alt+F4 if you want to.) The thing is, it really is useful to have the keyboard shortcuts in IrfanView so simple, and every application would—the only reason most applications don’t do this is because they can’t. Almost all applications require a combination of the Alt key or the Ctrl key and some other key for their keyboard shortcuts because the keyboard is usually being used for other things, so you have to differentiate the user typing from the user entering a command. But for an image viewing program, you’re not using the keyboard for anything; any time you hit any key, it’s a command. The thing is, developers are so used to using Alt and Ctrl for keyboard shortcuts that even for other image viewing programs, they do the same thing—Irfan had to think outside the box not to use Alt and Ctrl (in most cases), and I’m glad he did. The only time he resorted to using Ctrl or Alt or Shift is when a shortcut key was already taken, and he had to differentiate. “I’d like to use R to ‘reload’ an image, but I already used R for ‘rotate right’ so I’ll use Shift+R to ‘reload’ instead.”

In summary: IrfanView is a lightweight image viewing program which doesn’t get in the way, and does everything possible to make it easy to view images. And yet, even with its simplicity, it also provides some powerful features for day-to-day image editing. It’ll never be Photoshop, but of course it doesn’t try to be.

It took me a while, on Ubuntu, to find a comparable image viewing application. I didn’t even care about editing—I’d use GIMP if I had to edit anything—I just wanted a lightweight image viewer, that I could dismiss with the Esc key and navigate back and forth with the left and right arrow keys and go to fullscreen mode with the Enter key. (In other words, I wanted IrfanView for Linux.) I finally did find such a program, and it’s GPicView. It’s even more lightweight than IrfanView, in the sense that there are no editing capabilities, although it doesn’t make it any quicker to load than IrfanView. (You use F11 to go full-screen, instead of Enter, but that doesn’t matter—it’s still just one key, rather than a multiple-key combination. It even lets you rotate left and right using the L and R keys, just like IrfanView!)

I highly recommend IrfanView for day-to-day viewing of images. Any time a program can get out of the user’s way, and simply get its job done, it’s well worth the download. The fact that it’s free, lightweight, a small download, and has never caused me any issues after years of use are all additional points in its favour.

1 comments:

Sweep said...

I've never heard of IrfanView until now but it sounds pretty cool! I, too, like that the keyboard shortcuts are just one key. Esc to close the program? Genius. I think I'll check it out.