# DPlngScan

### The main window and basic operation

### The main window

There are several ways of opening the main window.

- You can double click on a file type that the program is configured to load (see choices). A window will open displaying that image
- You can drop a file that the program understands on the icon bar icon. Again, a window will open displaying that image
- Clicking with select will open an empty window. An image file can be dragged and dropped in to any open window, whether empty or not. The image will be displayed, overwriting any image already present

In most bit map programs, there is no such thing as an empty window. However, because DPlngScan can be used for acquiring images, it is quite a sensible thing. Another difference to packages like Paint, is that the window is in general not exactly the same size as the image you have loaded. In DPlngScan the window represents a work area. This can be the area of your scanner, or the area of your printer. You can move images around the work area to control where they are printed on paper. Similarly by marking an area of the work space you can select which bits of a page your scanner will scan.

Usually when the main window opens, two smaller windows will also open. These are the 'toolbox' (see right) and the 'info palette' (see below). By clicking on the toolbox icons, you can choose the current tool. The info palette displays useful information about the current image, and also allows you to control the image by either typing in values or clicking on the icons. When typing in values, it is normally necessary to use the RETURN key to register the changes. The info palette display will change depending on the current tool. The tools are the pointer, the grabber hand, the rectangular selection and the magnifier. These are described below.

One thing common to all the info palettes is the set of three buttons Undo, Redo, and Scan. If the image has been altered then Undo allows you to go back to the previous version of the image. The number of available undo steps is set in Choices. Redo allows you to reinstate a change after you have 'undone' a change.

Scan will invoke the scanning process. You must have an attached scanner, and the TWAIN driver loaded.

### The Pointer tool

This allows you to move the current image around the window. You do this by clicking within the image and dragging with the select button. There is one extra job for this tool. Holding down the Shift key and clicking on an image will transfer the colour of the pixel clicked on to the palette window (see the Colour section).

The info palette that accompanies the pointer tool is shown below. X and Y are the coordinates of the top left hand corner of the image, relative to the top left hand corner of the page displayed. Positive Y is downward - as if you measured the distance down the page with a ruler. W and H are the width and the height of the image. The measurements will be in the current units (see later). Pixels are shown in the image below. The two dpi values are the resolution in the X and Y directions. bpp is the number of bits per pixel for the image. Size is the amount of memory the image uses. Note that this size refers to the memory used by the image when converted to the internal RGB raster format - it does not refer to the size of the file on disc.

Page is the current page number in the file, followed by the total number of pages in it. Some of the file formats the program supports can hold more than one image in a file - you'll be familiar with this if you've ever loaded a sprite file into Paint. In general the large images that the program is designed for are best dealt with one image to a file. The program can read files with more than one image, but it can only save one image to a file. We term each image in a file a 'page' or sometimes 'frame'. By clicking on the arrows at the side of Page you can step back and forwards through the images in the file.

Dither. This controls if the program will attempt to use dithering to give a better on screen display. For example if you are working with 24bpp images and only have a 8bpp screen, enabling dither will make it much easier to see what you are doing. Dither can be toggled by clicking on the small icon to the left.

Finally you can close the info palette by clicking on the small icon at the far left of the info palette. The info palette can be moved by dragging in the area around this icon - like on a normal window title bar. The toolbox works in the same way.

The writable icons allow more precise values to be entered. The page number allows you to quickly jump to a frame. Finally the dpi values can be entered. This may seem odd. All it does is allow you to change the way the image is displayed. It can be useful if as often happens the image is supplied with incorrect resolution values. Values typed in will take effect when RETURN is typed.

### The Grabber Hand

This is a simple tool. It just allows you to move around the window, without using the scroll bars, you do this by clicking inside the window and then dragging. The info palette display is the same as for the pointer tool.

### The Rectangular Selection tool

This is probably the most useful tool. You use it to mark off a rectangular section of the work area. This area can be an area of an image that you want to apply the image processing tools to, or it can be an area of the page that you want to be scanned.

To mark off an area, click inside the window and then drag with select (below left). As soon as you release the mouse button the area will display 8 small squares or 'ears' (below right). These can be used to change the size of the marked area. You do this by clicking inside the small square and dragging.

The entire area can be moved by clicking and dragging inside it.

Finally you can clear the marked area by clicking outside of it with the select button.

The corresponding info palette, displays the coordinates of the top left hand corner of the marked area and its width and height.

The position and size of the marked area can also be specified by entering one or more of the values X, Y, W, and H from the keyboard. You must press the ENTER key for such changes to be registered.

#### Fixed aspect ratio

In the right hand side of the info palette is an option button Fixed aspect ratio. Below this are two writable icons. If the option button is unticked, there are no constraints on how the selected area can be resized in terms of width and height. If the button is ticked, the size of the area is constrained to a fixed aspect ratio, determined by the values in the two writables. The left writable is the width value, and the right writable is the height. When the aspect ratio is fixed, then as the area is resized, the width and height of the select area are always kept in that ratio. You will notice as you drag that the position of the pointer is adjusted to keep it at the nominal position of the small box/ear that is being dragged. This means that, for example, although the mouse may be being moved horizontally to extend the area, the pointer actually moves diagonally as the area extends both horizontally and vertically.

To the right of the aspect ratio writable fields is a popup menu button. This leads to a menu of stored aspect ratios. Selecting one of these options will write the width and height values in to the corresponding fields, and these values will then be used when dragging the area. If there is a select area active, its size will be adjusted to the new aspect ratio. New aspect ratios can be added to the popup menu by entering the width and height values into the writable fields, and then clicking the Add button. The new ratio will be added to the top of the menu, and will be remembered when DPlngScan is Quit/Restarted. The maximum allowed entries in the popup menu is 32 in version 1.32. If a new ratio is added when the number of items is already at the limit, then the option at the bottom of the popup menu will be discarded.

#### Colour of select area outline

The default colour for the rectangle outline is standard wimp red. The rectangle is drawn using the EOR action between the image and the rectangle colour. While this produces an easily visible rectangle and grab handles in most cases, there may be certain colours in the image that result in at least parts of the rectangle outline being difficult to see. If this is the case, then it is possible to cycle through other rectangle colours using the function key F2 (either the main window or the info palette must have the input focus), until a colour is found that makes the rectangle more visible. To return quickly to the default red colour use Shift-F2.

In the pictures below, of a small part of an image, the left image shows the rectangle in the default red colour, while the right image has had the colour changed to one of the other ones available. The rectangle is more easily seen.

### The Magnifier

This tool allows you to change the scale of the display, like the usual Zoom facility in other applications. Clicking and dragging with select will allow you to mark off an area, when you release the mouse button, that area will fill the window.

The corresponding info palette is shown below.

The top row of icons allow specific zooms to be set. The icon next to the word 'Zoom' shows the current zoom and new values can be typed in.

Previous will revert to the last zoom, Screen sets the scale so that the image would fill the screen, Window similarly sets the scale so that the image would fill the current window.

Finally, Rational sets the zoom so that one pixel in the original image, fills at least one screen pixel. You use it when you want to see all the pixels of the original image. Images will almost always look better when displayed in this way, rather than when scaled down so that some lines of pixels are missing.

### The Main Menu

Clicking over the main work area window with the menu button, displays the main menu, which has a number of sub-menus. The general operation of the program is controlled by the File and View sub menus. The File menu is concerned with files, saving them, and settings for the entire file. The View menu controls how the image is displayed. The other menus allow the image to be processed in various ways, Each of these menus is described in turn in the following pages.

When you modify an image, the title bar of the window will display a *. If you try to close the window, a warning message will be displayed, allowing you to save the image. This type of behaviour should be familiar from other RISC OS programs.

More than one image window can be open at a time, just by repeatedly clicking on the icon bar, or double clicking files.

The iconbar icon and menu | Index | The File menu

DPlngScan is © David Pilling, 1993
Email:chris@chris-johnson.org.uk