# The &kview; Handbook

## Introduction

&kview; is an image viewer for the &kde; desktop. You can view graphics of many different formats such as &PostScript;, TIFF &etc; By saving your files in a different format than the original you can easily convert images to other graphics formats. In addition, &kview; provides some nice little features for doing simple image processing, like stretching/shrinking, rotation and filtering. You can tile your images directly onto the desktop as a background picture, or arrange them in a little slideshow.

## A sample &kview; session

This chapter is a quick tour through many of &kview;'s functions to get you quickly going to work with this program. You will find a complete description of all available commands in later chapters.

The image in this tutorial comes from the kdeartwork package of &kde;. The kdeartwork package is full of things to spice up your desktop, and well worth checking out, but if you haven't installed it, just choose another file to follow along with.

### Let's go!

After you have started &kview; (using the panel menu, or typing `kview` at the command prompt) the &kview; main window shows up with an empty workspace:

Starting &kview; A new &kview; application window.

A fresh new &kview; window

All those creative people like you and me are discouraged by an empty sheet, so let's quickly open a new image. However, first we change the way that &kview; resizes its main window and the image after loading a new one: Select Configure KView from the Settings menu. A dialog leaps up:

Changing options The settings dialog.

To resize or not to resize

Select No Resize from the On Load group box. This means that neither the &kview; main window nor the image will be resized after loading.

Now open `Dasding.jpg` which you find in the `./share/wallpapers` subdirectory of your main &kde; path (possibly `/opt/kde` or `/opt/kde2`). Ahh - that's looking better!

Image loaded The wallpaper loaded into &kview;.

A beautiful image loaded...

### The cutting edge

Let's make a new background wallpaper out of the loaded image. We only need the &kde; logo (the gear-wheel on the right), not the whole picture, so select the logo by drawing a box around it. Press the left mouse button, hold it down and move the mouse. A dashed box appears, marking your selection. Repeat this until you are happy with your choice. Then go on and cut the selected region from the image by choosing Edit Crop from the menu bar or it's equivalent shortcut, &Ctrl;C. Your workspace should now look like this:

Image cropped An important selection

Reduced to the essentials

If you are not satisfied with the cutting you can always restore the image's original state with Edit Reset, or the shortcut &Ctrl;R.

### Stirring the paste

We wanted to be creative, didn't we? &kview; provides some filter functions to manipulate images. They are (conveniently) placed in the Filter menu. Firstly, we will change the so-called gamma factor. This value affects mostly the mid-tones in the picture, leaving the brightest and darkest parts more or less untouched. Choose Filter Intensity Gamma correct from the menu bar. A dialog box appears. Change the value to 0.4 and hit the OK button. The picture is somewhat darker now:

Gamma corrected Gamma correction

After the gamma correction

For a little psychedelic touch we use the brightness function. Selecting Brightness again brings up a dialog. This time you can enter the new brightness expressed in percent relative to the original value (so 100 percent means initial value). Enter a value of `300.0`300> and watch what happens:

Brighter Brighter than ever

&kde; brighter than ever before

Finally, we blur the image a little with Filter Smooth. Apply this filter two or three times (or more often if you can't stop!). The smoothing filter reduces the contrast between neighboring pixels:

Smoother Smoother than ever

&kde; - smooth as silk

### Cluttering up your desktop

Before we use our masterpiece as a desktop background we better save it. At the moment, our picture is a JPEG image, but for some reason we want to store it in the PNG format. Easy - just call File Save As and enter a filename with the extension `.png`:

Saving Saving the picture

Saving and converting in one

The great moment has finally come: Choose Desktop Desktop Tile and admire your incredibly artistic background:

Background A new background

KDE - wherever you look

## Command Reference

When you start &kview; you see the typical application layout: a workspace containing your documents (images in this case), a menubar that provides access to the various commands, a toolbar with shortcut buttons for some of them and a status bar at the bottom to display status messages. When you have the loaded an image into &kview;, there is also an additional context menu available which is displayed by clicking your right mouse button over the image (you knew that already, didn't you?). Below, all menu entries are explained in the order= that they appear in the menubar.

### The File Menu

&Ctrl;O File Open

- Opens a new image in &kview;. The size of the &kview; main window and the image after loading are determined by your settings. If you open several images, only the last one is shown, but all of them can be accessed using the image list.

File Open Recent

- Displays a list of recently opened images. Selecting one from this list reopens the image.

&Ctrl;S File Save

- Save the current image.

File Save As

- Saves the image under a different name. By choosing a new file format you can convert the image to a different graphics type.

&Ctrl;W File Close

- Closes the currently displayed image.

&Ctrl; P File Print

- Prints the image.

&Ctrl; N File New Window

- Creates a new (empty) application window.

&Ctrl; X File Close Window

- Closes the currently active window. If you have only one window open this effectively finishes your &kview; session.

&Ctrl;Q File Quit

- Quits &kview;. If you have several &kview; windows open, all of them are closed.

### The Edit Menu

&Ctrl; Shift F Edit Fullscreen Mode

- This option maximizes the &kview; window and the currently shown image so you can have a closer look at it. Even the window decorations (titlebar etc) are temporarily removed. Selecting this option once again switches back to normal mode.

C Edit Crop

- If you have selected any part of the image (by drawing a box around it using your mouse) you can cut off all the rest around it by using this option. Your image is effectively reduced to your selection.

Ctrl R Edit Reset

- Resets the image to its original state (right after opening it).

### The View Menu

View Zoom...

- Opens a dialog for editing the zoom factor. This value is given in percent and always refers to the initial size of the picture.

&Ctrl;+ View Zoom In

- Enlarges the image by ten percent. Notice that this refers to the current size of the picture.

&Ctrl;- View Zoom Out

- Reduces the image size by ten percent. Again this refers to the current size of the image.

] View Double size

- Doubles the current image size.

[ View Half size

- Cuts the image size by half. As above, this refers to the current image size.

M View Max size

- Maximizes the image size. The image is scaled to the window size. This action does not preserve the aspect ratio.

A View Max/aspect

- Maximizes the image size. Again, the image is size is maximized, but this time keeping the aspect ratio constant.

### The Transform Menu

This menu offers commands for simple geometrical operations: rotation and reflection.

; Transform Rotate clockwise

- Rotates the image by 90=B0 in the clockwise direction.

, Transform Rotate anti-clockwise

- Rotates the image by 90=B0 in the counter-clockwise direction.

V Transform Flip vertical

- Flips the image along the vertical. Mathematically, this does a reflection along the image's horizontal center line.

H Transform Flip horizontal

- Flips the image along the horizontal. Mathematically, this does a reflection along the image's vertical center line.

### The Desktop Menu

Desktop Desktop Tile

- Tiles your image to the desktop background..

Desktop Desktop Max

- Wallpapers your image to the desktop. This scales the image to the desktop size, possibly changing its aspect ratio.

Desktop Desktop Maxpect

- Wallpapers your image to the desktop. This scales the image to the desktop size, but keeps its aspect ratio constant.

### The Images Menu

&kview; provides some functions for simple image processing:

Images List...

- Displays a list of the currently loaded images. You can flip through the images by either double-clicking on them or using the Previous and Next buttons. Shuffle rearranges the images in a random order, Sort arranges them alphabetically. Pressing Start Slideshow will start the slideshow with the current settings for interval and looping. In addition, you can save and load your image list using the corresponding buttons.

&Alt;Left Arrow Images Back

- Switches to the previous image in the list.

&Alt;Right Arrow Images Forward

- Switches to the next item in the list.

S Images Slideshow On/Off

- Starts or stops the slideshow.

### The Filter Menu

&kview; provides some functions for simple image processing:

Filter Intensity Brightness

- Changes the brightness of the image. Enter the new brightness in percent (with respect to the initial value).

Filter Intensity Gamma Correct...

- Adjusts the gamma factor.

Filter Grayscale

- Converts a color image to a grayscale image.

Filter Smooth

- Smoothes the image by reducing the contrast between neighboring pixels.

### The Settings Menu

This menu provides options for configuring &kview;, changing its appearance, shortcuts and standard behavior.

&Ctrl;M Settings Show Menubar

- Toggles the menubar on/off.

Settings Show Toolbar

- Toggles the toolbar on/off.

Settings Show Statusbar

- Toggles the statusbar on/off.

Settings Save settings

- Saves the current settings.

Settings Configure Key Bindings...

- Opens a dialog for changing the key bindings. Using this option you can change the standard key shortcut for &kview;'s commands or create new ones.

Settings Configure Toolbars...

- Opens a dialog for configuring the toolbar. You can add and remove toolbuttons for &kview;'s commands with this option.

Settings Configure KView...

- Opens a dialog for changing some options and your keybindings:

  On Load

- This option determines if the window and/or the image will be resized after loading a new picture into &kview;. With Resize Window enabled, the &kview; window will be resized so that it snuggly fits around the loaded image. Notice that this can reduce the main window almost to a vertical arrangement of menu entries if you load a small button pixmap (you can resize the window afterwards in the usual way, of course). If your image is pretty large (in terms of pixels), sometimes the &kview; window is resized in such a way that the caption bar completely moves off your screen. Similarly, Resize Image resizes the image to fit into the &kview; workspace (keeping its aspect ratio intact). And with No Resize as your choice, both &kview; and your image keep their size.

Slideshow

- Here you can change the parameters for the slideshow: the interval between the different slides, and if the show should continuously loop.

### The Help Menu

&help.menu.documentation;

## Command Line Options

&kview; can be started directly from a terminal like &konsole; or xterm. Several command line options are available.

`kview` `--help`

- Lists the command line options (see below).

`kview` `--help-qt`

- Shows the options specific to &Qt; (the GUI library that &kde; is based on).

`kview` `--help-kde`

- Shows the &kde;-specific options.

`kview` `--help-all`

- Displays all command line options.

`kview` `--author`

- You want to send your warm wishes and euphoric cheers to someone? Here they are!

`kview` `-v`, `--version`

- Displays the version number of &kview; (and that of &Qt;/&kde;).

`kview` `--license`

- Shows under which licenses &kview; is being published.

## Credits and License

&kview;

Program copyright 1997-2001 Sirtaj S. Kang taj@kde.org

KParts integration by Simon Hausmann shaus@neuro2.med.uni-magdeburg.de

Maintainer: Matthias Kretz kretz@kde.org

Documentation copyright 2001 Hauke Hildebrandt hauke.hildebrandt@iup.uni-heidelberg.de

&underFDL; &underGPL;

## Installation

### How to obtain &kview;

&install.intro.documentation; &install.compile.documentation;

### Requirements

Since &kview; is part of the &kde; desktop you need a working &kde; installation to use it. However, some additional libraries are needed by &kview; to use the various graphics file formats. For example, to handle the PNG format &kview; needs the corresponding library libpng. &kview; uses the libraries that are registered by kdelibs/kimgio. Currently, libtiff, libpng and libjpeg are supported.

&documentation.index;