ArtToSpr
________

Purpose: Create sprites from Artworks and Draw files
Author:  Tony Houghton <riscos@realh.co.uk>
Version: 2.20 (02 April 2003)

Requirements
____________

RISC OS 3.1 or later
2MB or greater
Toolbox and Drawfile modules
Artworks modules (in AWViewer)

Special features/advantages
___________________________

Full control over scaling and rotation of source picture.


Instructions for interactive use
________________________________

ArtToSpr is quite simple, so this Help file won't describe it in detail. Use
Interactive Help (!Help in your Apps folder) to find the purpose of any icon
or window.

Having said that, there are a few points that would benefit from further
explanation:

Units
-----
Dimensions in output options are given in OS units, but the size of the
sprite in the info window is given in pixels.

Masked sprites
--------------
To give the sprite a masked background, select "None" in the colour picker.
You can still choose a background colour (to antialias against) immediately
before clicking "None"; this colour will be shown in ArtToSpr's main config
dialogue box as usual, but the letter "M" will also be shown to indicate the
sprite will be masked.

To distinguish between unplotted background and pixels filled in the same
colour as the background, a second copy of the sprite is temporarily
generated, and the two are compared pixel by pixel to generate the mask. Be
aware that this will increase memory usage, and it does take quite a long
time.

Scaling in conjunction with rotation
------------------------------------
Scaling always takes place after rotation, which may need to be borne in mind
when combining a rotation with inequal horizontal and vertical scale factors.

Aspect ratios
-------------
When a picture is scaled to fit a sprite of a given size it may need to be
scaled by different horizontal and vertical factors to achieve a perfect fit
(see also previous paragraph). To avoid this distortion, you can click
"Preserve aspect ratio". This will mean that the picture will probably only
fit the sprite in one direction, leaving some wasted rows or columns in the
sprite; there are 3 options for dealing with this:

Edge -   Plots the picture at the bottom/left of the sprite, leaving the
         blank rows at top or right.

Centre - Plots the picture in the middle of the sprite, leaving an equal
         amount of blank space at each edge.

Trim -   Removes the blank rows or columns, leaving the sprite smaller than
         specified in one direction.


Command line use
________________

First a warning:

DO NOT RUN ARTTOSPR IN A TASKWINDOW!

ArtToSpr works by redirecting VDU output to a sprite, which causes nasty
things to happen if you try to do it in a TaskWindow.

ArtToSpr can be used from the command-line by running the ArtToSpr Obey file
within, or by using the ArtToSpr command alias set by the !Boot file. The
syntax is:

  *ArtToSpr [-c Config_file] In_file Out_file

If present, Config_file is a text file containing choices corresponding to
the options available in the interactive version. See the file ConfigEg for
its syntax. If absent, the program will use any Choices file saved by the
interactive version, or make up suitable defaults if there isn't one.

In_file should be an Artworks or Draw file to be converted, and Out_file the
name of the sprite file to be created.

Alternatively, if both In_file and Out_file are directories, ArtToSpr will
load all Draw and Artworks files found in the former and save them as sprites
in the latter. It does not recurse through subdirectories, however.


Author's addresses
__________________

Tony Houghton
271 Upper Weston Lane
Woolston
Southampton
SO19 9HY

Email:   tony@realh.co.uk
WWW:     http://www.realh.co.uk

Licence
_______

This version is freeware. It may be freely copied as long as all files are
left intact and permission is sought before distributing it on a cover disc
or CD collection. The author can not be held liable for any damage or loss
caused by use of this program.
