# DPlngScan

### The Choices or configuration window

## The Choices window

The choices dialogue box can be accessed either by clicking on the icon bar icon with Adjust, or by selecting 'Choices' from the icon bar icon menu. Either approach will open a window. Across the top is a strip of file type icons. Clicking on these icons, will open a sub configuration window for the file type.

The options provided for the file types are discussed below. The arrows at either end of the strip allow the available file types to be scrolled through.

Across the bottom of the configuration window is another row of icons. These allow various aspects of the program to be controlled. Each icon represents a group of related parameters. Again configuration windows can be opened by clicking on the icons.

Finally there is a 'Save' button. Clicking on this will save the configuration of the program so that it is the same when the program is next used.

### Memory

This controls the programs use of memory. The top slider lets you set the maximum amount of RAM that it will use. The next two bars cannot be adjusted, they show the amount of RAM in use, and the amount of disc space being used as virtual memory.

Note that these bars can be confusing. The RAM bars show the proportion of the total RAM in the computer. The disc bar shows the proportion of free disc space in use. The free space on the disc may be much larger or possibly smaller than RAM. You should not make relative comparisons of the RAM and Disc bars.

The writable icon 'Temporary file' allows the directory where the temporary file holding image data which will not fit in RAM is held. Clicking on the right pointing arrow to the side of this, will pop up a standard save box. The icon may be dragged to where you want the temporary file to be held. Note that if a temporary file already exists, you cannot change the location immediately this way.

It may be useful to leave the memory box open to give you some idea as to how much memory you are using. The RAM and Disc bars will be continuously updated.

The temporary file should be kept on a large area of fast writable disc. By default it is created inside the directory !Scrap. It is not a good idea to put the temporary file on a RAM disc. Doing so defeats the object, and the program can make use of any spare RAM more efficiently itself, rather than via a RAM disc.

Usually the temporary file will only become active when large images are being handled, in such cases you must have plenty of free space on the disc. At any rate using virtual memory requires large areas of empty disc space. When virtual memory is in use, the general operation of DPlngScan will become much slower, since in general reads and writes to RAM will be much faster than to disc. Thus it is sensible to keep the max RAM as high as is practical.

### Windows

The five buttons on this window control the default appearance of each new window. Whether the window will have rulers, a toolbox, an info palette, if dithering will be enabled for it, and whether printer margins will be shown.

### Page

This allows the default page size, units and X and Y resolutions to be chosen, by clicking on the appropriate menu button to the right, and making a selection from the resulting menu.

### General

#### Alias filter type

This allows the Aliasing filter used for the operations on the Edit menu to be set.

#### Colour weights

Three writable icons which set the weights used when greyscaling images.

#### Long process

This allows you to specify what will happen whilst the program is busy working on a long process. The alternatives are to display the hourglass with a % sign, to multitask (which means you can carry on doing other things) or finally to blank the screen. Blanking the screen is useful because in screen modes with lots of colours and pixels the older Acorn computers run much more slowly. Multitasking will be the slowest option, and it is not always possible to multitask for example when transferring files to other applications. It is possible to arrange for an audible 'beep' to be made at the start and end of each multi tasking process to give some sort of feedback.

Which of these options you choose will depend on how you work. For slow machines the multi tasking option may be useful. For large screen modes blanking will be most suitable. For a fast machine the hourglass is probably best.

#### Undo steps

This allows the number of undo steps to be set. Increasing the number will use more RAM/disc space. On modern hardware, with 2GB RAM usable by RISC OS, several undo steps can be stored in memory for quite large images. More undo steps allows more flexibility when experimenting with editing images - if you do not like the result of one or more operations, the use of the Undo button allows the action to be reversed. The undo image data will be stored on disc if there is insufficient RAM available.

#### Histogram levels

This sets the default number of histogram levels used in the Histogram dialogue (from the main menu Filter-Histogram).

#### Auto-add file extension

If this is ticked, then when the image format is changed in the Save as dialogue, the file extension will be automatically added to the file name. If you wish to automatically add file extensions for sprite or draw files, then you need to also tick the option in the Sprite or Draw file dialogues. See the next section below. Some applications on foreign OS recognise these extension, e.g. Ovation Pro for Windows.

#### Auto scaling on load

This section determines how DPScan displays images on first load. The previous behaviour (versions up to 1.30) simply displayed the image at 100% scale in a relatively small window. Larger images showed only a small part of the image, thus requiring adjustment of e.g. zoom ratio to show the whole image on-screen. If nothing in this section is ticked, the behaviour continues to be the same as previously.

When Auto scale image on load is ticked, then when an image is dragged to the iconbar icon, or is double clicked in a filer window, and it is too large to show the whole image on screen at 100% zoom, the image will be zoomed to a smaller scale so it just fills the screen. If an image is dragged in to an already open window, then it is zoomed down to fit the existing window if necessary. The additional option Do not cover iconbar sets whether the whole screen is used, or whether the iconbar is left uncovered, when opening new windows.

If the option Autoset page size on load is ticked, then the image size will be compared with the default page size, and if the image is larger than this page size, the page size will be increased (for this document only) to include the whole image.

There is an additional option Allow custom page sizes. If this is not ticked, then the configured page sizes (as in the main menu file-page size) will be used. If ticked, then DPScan will calculate a page size sufficient to include the whole image, but not necessarily as large as the next higher metric A size. For very large images that are bigger than the 4A0 page size, a custom size will always be used.

### File types

### Sprite

This is the standard RISC OS bit map file type, as used by Paint and many other programs. Traditionally sprites come with a mode number which defines how they are to be displayed, bpp and resolution etc. The configuration options allow mode numbers to be defined for both rectangular (90x45 dpi) and square (90x90 dpi) pixels. Up until 1994, sprites only held 1, 2, 4, or 8 bpp data. However after that time, a new variation on the sprite format appeared. This can hold 16 or 32 bpp data. For the 16 bpp data 5 bits are given to each of red green and blue, for the 32bpp data 8 bits. If you save a 24bpp image as a sprite it will be saved with 32bpp. Be careful 16 and 32bpp images cannot be used on older (pre 1994 RISC OS) software or hardware.

Sprite files can contain more than one image. Images may have a mask. Whilst the 1,2 and 4 bpp formats are straightforward. The 8bpp format has been obfuscated by hardware dependencies. Original 8bpp sprites had 64 palette entries of which only 16 were used - the full 256 colours being synthesised from the palette and the colour numbers. Later 8bpp images have a full set of 256 palette entries. When saving sprites the program will supply a 256 entry palette. This may upset some old software.

In effect no resolution data is saved with sprites.

If the option Add spr extension is ticked then when an image is saved as a sprite file, the file name will have /spr appended (or changed to if an extension is already present). Note that the file extension will be added only if the Auto-add file extension is also ticked (see above in the general section).

### GIF

This is the Graphics Interchange Format. Originally invented by Compuserve (an online system or large bulletin board). The motivation was to allow pictures to be downloaded (transferred from one computer to another). It seems one of the design requirements was to allow images to be seen as they arrived. GIF (pronounced 'jiff') made use of the then new LZW data compression technique. GIF files give good results and are deservedly popular. GIF files can contain 1, 2, 3, 4, 5, 6, 7 and 8bpp images. They are therefore only of use for paletted images. GIF files can contain more than one image.

One configuration option is provided. Interlace controls if the image lines are stored contiguously (one after another) or with an interlace (every eighth line etc.).

No resolution data is saved.

### BMP

This is the Windows and OS/2 equivalent of Acorns Sprite file. Images may contain 1, 4, 8 or 24 bpp data. Simple data compression is implemented. The configuration option allows either Windows 3 or OS/2 headers to be written to saved files.

No resolution data is saved.

### PBM

In the world of UNIX there are several large suites of general purpose image manipulation software. One such is Jeff Poskanzer 'PBM' toolkit. There are variations on the format to handle grey scale (PGM Portable Grey Map), 1bpp (PBM Portable Bit Map) and colour images (PPM Portable Pixel Map). The configuration option Rawbits controls if PBM files will be stored as binary or text files. Binary (Rawbits selected) are much more compact than the text file option.

No resolution data is saved.

### JPEG

This file format is from the Joint Photographic Experts Group who set out to produce a standard for lossy compression. Technically speaking the file format is JFIF (JPEG File Interchange Format). These files can cope with 24 bit images or 8 bit grey scale data. Because the compression is lossy you should only use JPEG files for saving the final result of image manipulation. However JPEG compression is often excellent, reducing huge files to manageable proportions.

The configuration option Quality (0 to 100%) controls how good a representation of the original the file will be. 100% gives no loss of data.

Resolution data is saved.

### TIFF

This file format goes back to the early days of micro computers. It was an attempt to invent a file type for images that could be used by all programs. Developers of TIFF included Aldus, Lotus and Microsoft. TIFF stands for Tagged Image File Format. As the name hints TIFF files are extendible, more tags can be added to give more information about images. TIFF attempts to be everything to everyone. Unfortunately as a result it is possible to have two programs which both use TIFF files and are completely incompatible. However in many ways TIFF is the file format of choice.

TIFF files can contain all bpp images, including paletted and non paletted images. Resolution data is saved with the images, and a file can contain more than one image.

Configuration options allow you to choose the data compression method used. For black and white images, special coding techniques from the world of Fax are provided. For colour images there are other techniques. Note that all the black and white options can be toggled off (click on a selected one with adjust) and the colour data compression will then be used for all images.

### EPS

### PNG

The configuration window for PNG is shown below.

### Draw

The configuration window for Draw is shown below.

If the option Add file extension is ticked then when an image is saved as a draw file, the file name will have the configured extension appended (or changed to if an extension is already present). Note that the file extension will be added only if the Auto-add file extension is also ticked (see above in the general section).

In the case of draw files, you can choose whether to use /aff or /drw as the file extension. Both extensions are accepted by Ovation Pro for Windows (with aff preferred), but some other PC software that understands draw files will only accept one or the other. In addition, the extensions are used by other PC software for files that are not related to RISC OS draw files.

Note - DPlngScan does not magically convert the image to a vector format. The image remains a sprite but in a draw file format wrapper. This can sometimes be useful for use with certain software.

### MTV, PCX, Clear, ICO

These four formats produce a similar configuration window. The only real choice is whether to load the file when double clicked in a filer window.

No resolution data is saved.

Clear - Given the confusion surrounding Acorn sprite files, and their original inability to support 24bpp, John Kortinck (of Translator fame) invented a file type that was simple and straightforward - hence the name 'Clear'. Clear files can contain 1,2,4, 8 or 24 bpp. There is no data compression. Quite a few RISC OS programs can handle Clear files.

MTV - This file format was invented to save the output of the MTV ray tracer. It is a simple 24bpp format with no data compression.

PCX - This is a file format popularised by ZSofts PC Paintbrush package on the PC. Files may contain 1, 2, 4 or 8 bpp. Simple run length data compression is implemented.

The Colour menu | Index | Scanning

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