pho: View and annotate multiple images

...Akkana

pho (pronounced like the first syllable in "photo") is a lightweight program for viewing large numbers of images quickly, rotating or deleting some, and making notes about what to do with each image -- for instance, for going through hundreds of images after uploading them from a digital camera.

The current version is pho 0.9.8.
To get it, skip to the download section.

You can now customize the command called up with the 'g' key. It defaults to gimp (not gimp-remote as in previous pho versions), but you can call any program you like, e.g. view the current image in firefox with export PHO_CMD="firefox %s" -- don't forget the %s for the filename!

BSD users: pho should build on *BSD now as of 0.9.6-pre2. If it doesn't, please let me know.

Other changes include major work on scaling modes. Double and half size mode now behave differently depending on whether you're in normal or full size mode, and the scaling factor (e.g. half size) is remembered as you go from image to image.

Warning: I've swapped the meanings of f and F. I found that I use full size mode all the time, whereas I seldom use full screen, and when I do, I use it once at the beginning of a session (e.g. to view a bunch of cartoons scaled up). So it makes more sense to have full size on f (easier to type).

I've also done quite a bit of performance work, to reduce the number of redraws, speed up rotates, and reduce the number of times Pho has to re-read the file on disk.

Skip to the download section.

How to use pho

Usage: pho *.jpg (or whatever).
It will show the first image, scaled for your screen if needed. Then the following keys work:
space
Go to next image.
backspace, -
Go to previous image.
r, t, right-arrow
Rotate right (clockwise).
R, T, l, L, left-arrow
Rotate left (counter-clockwise).
up-arrow
Rotate 180 degrees.
home
Go back to the first image.
d
Bring up a delete dialog (another d deletes the file)
i
Show information about the image (includes EXIF info and JPEG comment, if any).
0-9
Add this image to the appropriate list.
f
Toggle in and out of "full size mode" (show the image at its native size, even if that's too big to fit on screen)
F
Toggle in and out of "full screen mode" (make the image as big as it can be and still fit on the screen).
p
Toggle in and out of Presentation Mode (full screen, no mouse or window borders)
-, /
Zoom out, to half size
+, =, *
Zoom in, to double size o
Pop up a file selector to change the working file list (New replaces all the old images, Add just adds new files to the list)
g
Run gimp on this image (or set PHO_REMOTE to an alternate command).
q
Quit.

Pho will remember the correct (last shown) rotation for each image. When it exits (either because the last image was viewed or because the user typed q), it will print out the images that need to be rotated and deleted (it does not actually change the files on disk), and the images which were added to numbered lists. For example, I might press 1 on all the photos I want to save for a web page, 2 on the couple of photos that need additional editing in gimp, and 3 on the photos I want to save as desktop backgrounds.

Modes

Presentation mode

Normally, Pho shows images in its own window, and it tries hard to move and resize the window as needed to keep the window the right size and over the mouse.

Presentation mode (-p) makes pho fullscreen. It also enables dragging with the middle mouse button to pan in the image. By default, pho will scale images to fit the screen, so there's no need to pan; but if you zoom in, either with f (full size) or + (double size), you may want a way to move around in the image. (In non-presentation mode, the image is in its own window, so you can move the window using your window manager.) Pho's author uses presentation mode as her default: PHO_ARGS=-p and runs pho -P in the rare cases where she doesn't want fullscreen.

Slideshow mode

There's also a new slideshow mode, where you specify the interval in seconds (e.g. pho -p -s5 for a 5-second delay between images). You can use this for a screensaver, or just to go through slides automatically. Hitting the spacebar cancels slideshow mode.

Keywords mode

Keywords mode gives you an easy way to annotate a directory of images with strings. You can type in phrases for each note, and you can have up to 31 notes now. You can also type in a unique image comment for each image. Comments aren't tied to the numbered image flags -- each image has its own comment.

Keywords and comments are available in every pho mode (via the info dialog: type i in any image to see current keywords and comment). Keywords mode just gives better access to this. However, you may find metapho to be a better way to mange keywords.

Why another image viewer? Surely there are plenty of those?

I used to use xv for paging through images -- it's quite a good viewing program -- but it had a few features which annoyed me. For example, it creates a directory called .xvpics in every directory it touches; and if an image has to be resized to fit the screen, and after that you save it (perhaps after rotating it), it saves at the smaller size and boom, there goes your high-res image.

But, more important, there were a few extra things I needed. During image triage, I need to be able to do a few things quickly:

With xv, I found that I was writing these lists on paper, or trying to keep track of them in my head. That's dumb! Why not make the computer do that work? So I did.

Since I wrote pho several years ago, I keep hearing about other image viewers, and thinking maybe pho was redundant. But I recently did a search, and couldn't come up with any other image viewers that are similarly efficient for paging through large collections of images. So I guess I'll keep maintaining pho!

Pho can read any format supported by gdk-pixbuf. I haven't found a list of those formats anywhere, but it seems to be substantial. The only format I've hit so far that it doesn't read is photocd. You can convert those to other formats using the ImageMagick utility.

Pho can delete images on disk, but it doesn't save rotated images. I use my imagebatch scripts for that, or you can use a commandline utility like ImageMagick (which is what my imagebatch scripts use under the hood).

Download: Getting pho

Current version: pho-0.9.8.tar.gz. (source tarball).

Latest source tree: Pho is now hosted on Github, and you can get the latest source tree there, as well as file bugs or otherwise participate.

There's also an old Google Code repository but it's gotten out of date -- I recommend you not use it.

Debian/Ubuntu packages for 0.9.8:

Ubuntu 12.04 Precise Pangolin
pho_0.9.8-0ubuntu0~12.04_i386.deb
Debian Squeeze
pho_0.9.8-squeeze_i386.deb
Source packages
pho_0.9.8.dsc
pho_0.9.8.tar.gz
pho_0.9.8_i386.changes

I will get the Ubuntu packages onto Launchpad soon, I hope.

Ancient Windows binary (requires gtk+): pho-0.9.5-pre5.zip. (Thanks to Michael Schumacher!)

Mac users: Pho definitely does work on Mac OS X if you have the appropriate gtk/gdk headers and libraries (my husband uses it). I've only seen it used as an X11 application, but in theory it should be able to run with the new experimental native gtk libraries too.

Dependencies:

pho uses the gtk+-2.0 libraries (though if it can't find them, it can run slightly less functionally with gtk1 and gdk-pixbuf). You may need to edit the Makefile if your system has these libraries installed in different place from my system (sorry, no autoconf yet).

To compile pho, you'll need a compiler, GTK, and all the libraries it depends on. For example, on Ubuntu, this command should get you what you need:

aptitude install build-essential libgtk2.0-dev

If you like pho, or if you think it's promising but there's some feature it really needs ... let me know!


Akkana's Software
Shallowsky Home