# The Viewer

The reason for you to put all your images into &kphotoalbum;, and spending hours after hours describing them, is of course that you at some point want to look at them. For that purpose &kphotoalbum; has an viewer capable of showing your images and videos. You open the viewer from the thumbnail view as described in chp-thumbnail-view.

The viewer can be seen in fig-viewer. The viewer does of course show you the image, but in addition to that it also shows you the information you specified for each image, including, who is on the images, where and when it was takes, &etc;

## The Viewer

In case the info box is located on top of part of the images you actually want to see, you can simply grab it with the mouse, and move it elsewhere on the image. It is possible to configure what should be shown in the info box, and of course whether it should be shown at all. All these options are available by right clicking your mouse on the viewer. The context menu can be seen in fig-viewer-contextmenu below.

## The viewer's context menu

Some of the words in the info box is underlines. If you click the mouse on one of these words the browser (see chp-browsing) will go into scope of that item. Thus if you click on `Anne Helene` the browser will show you all images of Anne Helene, just as it would have done if you selected `People` from the root of the browser, and next selected `Anne Helene`.

In the info box you can see a small button with the &kphotoalbum; logo. Pressing that button will get you to the thumbnail viewer. The thumbnail view will display all images, and the image you just had in the viewer will be selected. The idea behind this is the following: you browse to a given person, and look at the images of that person. One of the images is from say your high school time, and now you want to see images from that period of time. Using the Jump to Context button, you are brought to the thumbnail view showing all images, with the current one being in focus, and likely all your high school pictures around it.

In case you have loaded several images into the viewer, you can go forth and back using Page Up and Page Down. You can go to the first and last images using Home and End. These functions are of course also available from the context menu.

If several images was loaded into the viewer, you can ask it to run them as a slide show, which means that &kphotoalbum; loads a new image every few second. How often it loads a new image is configure by pressing the control key and respective plus (for go faster) or minus (go slower). Starting and stopping the slide show is done simply by pressing &Ctrl;S.

A very useful feature of the &kphotoalbum; viewer is it ability to go into full screen mode. In this mode, the viewer is using the complete screen space, simply press the return key to make it go into and out of full screen mode.

Using the viewer, you may zoom in and out of your image, simply by dragging out a rectangle with the mouse. Pressing the minus key will zoom out again. Pressing the plus key will zoom in at the center of the image. fig-marking-zoom-rectangle below shows how a zoom rectangle is marked, and fig-zoomed-view shows the result of the zoom.

Pressing the period key, lets you reset zooming, so the image is shown un-zoomed. Pressing the equal sign will set the zoom level so each pixel on the screen correspond to a pixel in the image.

Notice, for technical the only zooming operation that works when watching videos are zoom in and out (the plus and minus key).

## Zooming in the viewer

Choosing the rotate operations from the context menu, you may rotate the image (Does not work for videos). You can annotate the current image, simply by choosing Annotate in the context menu.

## Annotating images from the viewer

Traditionally the main way for tagging images has been though the annotation dialog. Over the years a few different attempts have been made at integrating tagging into the viewer, first attempt was by assigning tokens in the viewer, a later attempt was by making it possible to tag directly by typing part of a category item. In addition category items could be assigned to function keys on the keyboard. The code for all of this have now been modernized to make the work flow much more intuitive and discover-able.

There are three modes to annotating images in the viewer:

- Locked - This is the default mode when starting the viewer - in here no annotating or tokenizing will happen. This ensure you do not accidentally annotates images when viewing them.

- Assign Tokens - This allows you to set tokens on images, by simply pressing a key from A-Z on the keyboard.

- Assign Tags - This allows you to assign macros to a keyboard key. As an example, L could mean set the item Las Vegas in the Location category. In addition to that, it also allows you to set any tag on an image.

The modes are selected from the context menu as can be seen in fig-ctxmenu-for-mode-selection.

The two modes are described in details below.

### Selecting annotation mode from the viewer

## Setting Tokens from the Viewer

Imagine you want to sent a number of images to a printer to get them developed on paper. To see which you want, you start the viewer on the images, and tag them as good, bad, or maybe, while inspecting each one.

You may of course create a few new items (say Good, Bad, Maybe) for an existing category, say the category Album. However, given that you likely do not need these tags once you've send the images to the printer, there is an easier way, namely by simply setting tokens on the images. Tokens are named from A to Z, and you set a token simply by pressing its letter. In fig-images-with-tokens you may see an image where the tokens A, B and C are set.

### An Image with Tokens

For this to work, you need to be in the Assign Tokens mode. See fig-ctxmenu-for-mode-selection

Once you've set tokens on your images, they will be available for regular browsing in the browser, as can be seen in fig-tokens-in-browser. So when you've marked images that needs to be edited, printed, or whatever, simply browse to the images, and process the set from there, e.g. by using copy images to... from the context menu.

### Tokens seen in the Browser

Categories (and esp tokens) may be displayed in the thumbnail viewer. When Showing the categories in the thumbnail viewer, you may also add tokens to images, simply by pressing the letter for the token when the image is selected, this can be seen in fig-tokens-in-thumbnail-viewer

### Tokens seen in the Thumbnail Viewer

## Tagging images from the viewer

Tagging images can be tiresome, even in &kphotoalbum;, at least when you've fallen behind and have thousands or tens of thousands of images in need of proper tagging. Fortunately, it is now possible to add tags with the press of a single key when viewing the images. The realization behind this way of working with images is that most images are with the same few people in the same few places, plus a few "guest" appearances from time to time - say the location of your vacation, or some friends who were visiting you for a week.

To tag your images while viewing them, you need to enter the Assign Tags mode - see fig-ctxmenu-for-mode-selection. With this enable, simply press a letter key on your keyboard to either assign or use the assigned tag.

In fig-assign-macro-step1 below, I've just pressed s while watching images and being in the Assign Tags mode. This brought up the dialog where I can specify what tag to assign to that key.

### Step 1 - assigning a macro to the key s

Next, in the line edit I typed sp which suggest "People / Jesper" and "People / Spiff". Both matched the letters I typed. Pressing arrow down to select Spiff and pressing enter, will assign the letter s to adding the tag People / Spiff to the image viewed. This assignment, will be saved for future sessions. To re-assign s to another tag, simply press &Shift;s.

### Step 2 - assigning a macro - typing sp

In fig-assign-macro-overview below you can see existing keybindings in the right side of the dialog.

### Overview of assigned key bindings

In case the tag you want to assign doesn't already exist in your database, then simply press the Add New button to create it. This can be seen in fig-assign-macro-add-new-value.png below

### Adding a new tag

While tagging images from the viewer, you may want to add a tag, without binding it to a key. To do so simply press &Ctrl;a