ReadMe for csv2jpeg / csv2png
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Wed 16th August 2000

This program (or programs) is a development of "csv2gif", as presented
with my article in Acorn User, issue 215. The program(s) reads
time-series data in comma-separated-variable format, and draws a
simple line graph.

Since my article was written the gd library, used to generate the
graphic files, has migrated from gif output to png, and latterly jpeg.
This has been prompted by concerns in respect of patents on the
compression scheme used in gif files (although the compression algorithm
had been removed from gif). But moving to png (portable network
graphics) is a good thing, since the files are smaller. The only
downside is that the png libraries are large, so csv2png is about twice
as big as csv2gif.

To get basic usage instruction, execute csv2png (or csv2jpeg) from a
task window, with no extra arguments:

    *csv2png
    Usage: csv2png in_csv out_png width height [tform]
    tform is a string of time format speciers, with no punctuation.
    d date
    m month
    y year without century
    Y year with century
    H hour (0-23)
    M minute
    S second
    e.g. "dmyHMS" for British format, "mdyHMS" for US.

csv2jpeg is same, but it writes jpeg files (but in general this is a bad
idea - the line plots make bigger files and look grotty!).

width / height are the overall dimensions in pixels.

The default date/time format (i.e. if the final argument is omitted) is
dmyHMS - i.e. British format, such as 17/08/00 10:58:23

The date/time is always read from the first entry of a line. To be
recognized as a time the entry must include at least one number and one
or more of '/', ':' or '-'. Lines with no recognized date/time are
ignored.

Lines that start with '#' are ignored.


Compiling
=-=-=-=-=

This release includes source code. The Makefile has been written for
AMU. Note that you will need to link to several libraries. See Makefile
for details.


Linux
=-=-=

The 'Linux' distribution is much the same. Unpack the archive somewhere
convenient and type 'make'. Type 'make test' for trial png and gif
output. To install the binaries type 'make install' - su privilege
required.

You may have to change the library locations, &c, to suit your setup.
Check the Makefile.


Simon J. Melhuish
simon@melhuish.net
http://www.melhuishs.freeserve.co.uk/simon/
